Subversion Repositories Scribus

Rev

Rev 44 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 paul 1
# Original Author was Kalle@kde.org
2
# I lifted it in some mater. (Stephan Kulow)
3
# I used much code from Janos Farkas
4
 
5
dnl Process this file with autoconf to produce a configure script.
6
 
7
AC_INIT(acinclude.m4) dnl a source file from your sub dir
8
 
9
dnl This is so we can use kde-common
10
AC_CONFIG_AUX_DIR(admin)
11
 
12
AC_CANONICAL_SYSTEM
13
AC_ARG_PROGRAM
14
 
15
dnl Automake doc recommends to do this only here. (Janos)
59 Franz 16
AM_INIT_AUTOMAKE(scribus,1.0)
3 paul 17
 
18
dnl KDE_SET_PREFIX
19
 
20
AC_PREFIX_DEFAULT(/usr/local)
21
if test "x$prefix" = "xNONE"; then
22
  prefix=$ac_default_prefix
23
  ac_configure_args="$ac_configure_args --prefix $prefix"
24
fi
25
 
26
AC_ARG_ENABLE(debug, [  --enable-debug     Enables Debug-Code],
27
[if test "x$enable_debug" = "xyes"; then
28
	AC_DEFINE_UNQUOTED(DEBUG, 1, [Debug Messages])
29
fi])
30
LIBFREETYPE_LIBS=""
31
LIBFREETYPE_CFLAGS=""
32
 
33
FREETYPE_CONFIG=""
34
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, [AC_MSG_WARN([Could not find libfreetype anywhere, check http://www.freetype.org/])], [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin /usr/X11/bin])
35
 
59 Franz 36
hafree=yes
3 paul 37
if test -n "$FREETYPE_CONFIG"; then
59 Franz 38
	LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
39
  LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
40
	AC_CHECK_LIB(freetype, FT_Get_Next_Char, [AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])],[hafree=no])
41
	AC_SUBST(LIBFREETYPE_LIBS)
42
	AC_SUBST(LIBFREETYPE_CFLAGS)
43
else
44
  AC_MSG_WARN([You need at least libfreetype 5.0])
3 paul 45
fi
46
 
47
AC_CHECK_LIB(socket,socket,
48
if test "$uname" != "IRIX"; then
49
	LIBS="-lsocket $LIBS"
50
else
51
	echo "Not using -lsocket since you are running IRIX."
52
fi)
53
AC_CHECK_LIB(nsl,gethostbyaddr,
54
if test "$uname" != "IRIX"; then
55
	LIBS="-lnsl $LIBS"
56
else
57
	echo "Not using -lnsl since you are running IRIX."
58
fi)
59
LIBCUPS=""
60
hacups=
61
AC_CHECK_LIB(cups, httpConnect, [LIBCUPS="-lcups";hacups=yes],[LIBCUPS="";hacups=no])
62
AC_SUBST(LIBCUPS)
63
LIBLCMS=""
64
hacms=
65
AC_CHECK_LIB(lcms, _cmsChannelsOf, [LIBLCMS="-llcms";hacms=yes],[LIBLCMS="";hacms=no])
66
hacmsh=
67
AC_CHECK_HEADER(lcms.h, [hacmsh=yes],[hacmsh=no])
68
if test $hacmsh = no; then
69
	AC_CHECK_HEADER(lcms/lcms.h, [hacmsh=yes],[hacmsh=no])
44 Franz 70
	if test $hacmsh = yes; then
71
 		AC_DEFINE_UNQUOTED(CMS_INC, "lcms/lcms.h", [ColorManagementInclude])
72
	fi
73
else
74
 AC_DEFINE_UNQUOTED(CMS_INC, "lcms.h", [ColorManagementInclude])
3 paul 75
fi
76
AC_SUBST(LIBLCMS)
77
if test $hacms = yes && test $hacmsh = yes; then
78
 AC_DEFINE_UNQUOTED(HAVE_CMS, 1, [ColorManagement])
79
fi
80
LIBTIFF=""
81
hastif=
82
AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no])
83
AC_SUBST(LIBTIFF)
84
if test $hastif = yes; then
85
 AC_DEFINE_UNQUOTED(HAVE_TIFF, 1, [Tifflib])
86
fi
87
LIBDL2=""
88
AC_CHECK_LIB(c, dlopen, [LIBDL2="-lc"],[LIBDL2=""])
89
AC_SUBST(LIBDL2)
90
 
91
dnl generate the config header
92
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
93
 
94
AC_DEFINE_UNQUOTED(PREL, "$prefix", [Dataprefix])
95
dnl Checks for programs.
96
AC_CHECK_COMPILERS
97
AC_ENABLE_SHARED(yes)
98
AC_ENABLE_STATIC(no)
99
KDE_PROG_LIBTOOL
100
 
101
AC_CHECK_HEADER(cups/cups.h, [foo=""],[hacups=no])
102
if test $hacups = yes; then
103
 AC_DEFINE_UNQUOTED(HAVE_CUPS, 1, [Cups])
104
fi
105
 
106
all_libraries="$all_libraries $USER_LDFLAGS"
107
all_includes="$all_includes $USER_INCLUDES"
108
AC_SUBST(all_includes)
109
AC_SUBST(all_libraries)
110
 
111
 
112
AC_PATH_QT
113
 
114
AC_CONFIG_FILES([Makefile])
115
AC_CONFIG_FILES([scribus/Makefile])
116
AC_CONFIG_FILES([scribus/icons/Makefile])
117
AC_CONFIG_FILES([scribus/libabout/Makefile])
118
AC_CONFIG_FILES([scribus/libprefs/Makefile])
119
AC_CONFIG_FILES([scribus/plugins/libchar/Makefile])
21 Franz 120
AC_CONFIG_FILES([scribus/plugins/svgexplugin/Makefile])
23 Franz 121
AC_CONFIG_FILES([scribus/plugins/printpreview/Makefile])
3 paul 122
AC_CONFIG_FILES([scribus/plugins/Makefile])
123
AC_CONFIG_FILES([scribus/libpostscript/Makefile])
124
AC_CONFIG_FILES([scribus/profiles/Makefile])
125
AC_CONFIG_FILES([scribus/libpdf/Makefile])
126
AC_CONFIG_FILES([scribus/dicts/Makefile])
127
AC_CONFIG_FILES([scribus/qm/Makefile])
128
AC_CONFIG_FILES([scribus/po/Makefile])
129
AC_OUTPUT
130
echo "Configuration Summary:"
131
echo ""
59 Franz 132
if test $hafree = yes; then
133
	echo "FreeType2 installed: Yes"
134
else
3 paul 135
	echo "FreeType2 installed: No"
136
fi
137
if test $hacups = yes; then
138
	echo "CUPS installed: Yes"
139
else
140
	echo "CUPS installed: No"
141
fi
142
if test $hacms = yes; then
143
	echo "LittleCMS installed: Yes"
144
else
145
	echo "LittleCMS installed: No"
146
fi
147
if test $hastif = yes; then
148
	echo "TiffLib installed: Yes"
149
else
150
	echo "TiffLib installed: No"
151
fi
152
echo ""
153
echo "Start make now."