Subversion Repositories Scribus

Rev

Rev 41 | Rev 59 | Go to most recent revision | 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)
41 Franz 16
AM_INIT_AUTOMAKE(scribus,1.0RC2)
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
 
36
if test -n "$FREETYPE_CONFIG"; then
37
  vers=`$FREETYPE_CONFIG --version 2>/dev/null | sed -e 's/libfreetype //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
38
  if test -n "$vers" && test "$vers" -ge 5000000
39
  then
40
     LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
41
     LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
42
		 AC_SUBST(LIBFREETYPE_LIBS)
43
		 AC_SUBST(LIBFREETYPE_CFLAGS)
44
     AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])
45
  else
46
     AC_MSG_WARN([You need at least libfreetype 5.0])
47
  fi
48
fi
49
 
50
AC_CHECK_LIB(socket,socket,
51
if test "$uname" != "IRIX"; then
52
	LIBS="-lsocket $LIBS"
53
else
54
	echo "Not using -lsocket since you are running IRIX."
55
fi)
56
AC_CHECK_LIB(nsl,gethostbyaddr,
57
if test "$uname" != "IRIX"; then
58
	LIBS="-lnsl $LIBS"
59
else
60
	echo "Not using -lnsl since you are running IRIX."
61
fi)
62
LIBCUPS=""
63
hacups=
64
AC_CHECK_LIB(cups, httpConnect, [LIBCUPS="-lcups";hacups=yes],[LIBCUPS="";hacups=no])
65
AC_SUBST(LIBCUPS)
66
LIBLCMS=""
67
hacms=
68
AC_CHECK_LIB(lcms, _cmsChannelsOf, [LIBLCMS="-llcms";hacms=yes],[LIBLCMS="";hacms=no])
69
hacmsh=
70
AC_CHECK_HEADER(lcms.h, [hacmsh=yes],[hacmsh=no])
71
if test $hacmsh = no; then
72
	AC_CHECK_HEADER(lcms/lcms.h, [hacmsh=yes],[hacmsh=no])
44 Franz 73
	if test $hacmsh = yes; then
74
 		AC_DEFINE_UNQUOTED(CMS_INC, "lcms/lcms.h", [ColorManagementInclude])
75
	fi
76
else
77
 AC_DEFINE_UNQUOTED(CMS_INC, "lcms.h", [ColorManagementInclude])
3 paul 78
fi
79
AC_SUBST(LIBLCMS)
80
if test $hacms = yes && test $hacmsh = yes; then
81
 AC_DEFINE_UNQUOTED(HAVE_CMS, 1, [ColorManagement])
82
fi
83
LIBTIFF=""
84
hastif=
85
AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no])
86
AC_SUBST(LIBTIFF)
87
if test $hastif = yes; then
88
 AC_DEFINE_UNQUOTED(HAVE_TIFF, 1, [Tifflib])
89
fi
90
LIBDL2=""
91
AC_CHECK_LIB(c, dlopen, [LIBDL2="-lc"],[LIBDL2=""])
92
AC_SUBST(LIBDL2)
93
 
94
dnl generate the config header
95
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
96
 
97
AC_DEFINE_UNQUOTED(PREL, "$prefix", [Dataprefix])
98
dnl Checks for programs.
99
AC_CHECK_COMPILERS
100
AC_ENABLE_SHARED(yes)
101
AC_ENABLE_STATIC(no)
102
KDE_PROG_LIBTOOL
103
 
104
AC_CHECK_HEADER(cups/cups.h, [foo=""],[hacups=no])
105
if test $hacups = yes; then
106
 AC_DEFINE_UNQUOTED(HAVE_CUPS, 1, [Cups])
107
fi
108
 
109
dnl AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
110
all_libraries="$all_libraries $USER_LDFLAGS"
111
all_includes="$all_includes $USER_INCLUDES"
112
AC_SUBST(all_includes)
113
AC_SUBST(all_libraries)
114
 
115
dnl for NLS support. Call them in this order!
116
dnl WITH_NLS is for the po files
117
dnl AM_KDE_WITH_NLS
118
 
119
AC_PATH_QT
120
 
121
dnl Perform program name transformation
122
dnl AC_ARG_PROGRAM
123
 
124
dnl PACKAGE set before
125
 
126
dnl KDE_CREATE_SUBDIRSLIST
127
 
128
dnl add here all your Makefiles. This are created by configure
129
dnl The following line is for Autoconf 2.13, Uncomment it, if you are using this old version
130
dnl and delete all lines with AC_CONFIG_FILES
131
dnl AC_OUTPUT(Makefile scribus/Makefile scribus/icons/Makefile scribus/libabout/Makefile scribus/libprefs/Makefile scribus/plugins/libchar/Makefile scribus/plugins/Makefile scribus/libpostscript/Makefile scribus/profiles/Makefile scribus/libpdf/Makefile scribus/dicts/Makefile scribus/po/Makefile scribus/qm/Makefile )
132
 
133
dnl This stuff is for Autoconf 2.5 and above
134
AC_CONFIG_FILES([Makefile])
135
AC_CONFIG_FILES([scribus/Makefile])
136
AC_CONFIG_FILES([scribus/icons/Makefile])
137
AC_CONFIG_FILES([scribus/libabout/Makefile])
138
AC_CONFIG_FILES([scribus/libprefs/Makefile])
139
AC_CONFIG_FILES([scribus/plugins/libchar/Makefile])
21 Franz 140
AC_CONFIG_FILES([scribus/plugins/svgexplugin/Makefile])
23 Franz 141
AC_CONFIG_FILES([scribus/plugins/printpreview/Makefile])
3 paul 142
AC_CONFIG_FILES([scribus/plugins/Makefile])
143
AC_CONFIG_FILES([scribus/libpostscript/Makefile])
144
AC_CONFIG_FILES([scribus/profiles/Makefile])
145
AC_CONFIG_FILES([scribus/libpdf/Makefile])
146
AC_CONFIG_FILES([scribus/dicts/Makefile])
147
AC_CONFIG_FILES([scribus/qm/Makefile])
148
AC_CONFIG_FILES([scribus/po/Makefile])
149
AC_OUTPUT
150
echo "Configuration Summary:"
151
echo ""
152
if test -z "$LIBFREETYPE_LIBS"; then
153
	echo "FreeType2 installed: No"
154
else
155
	echo "FreeType2 installed: Yes"
156
fi
157
if test $hacups = yes; then
158
	echo "CUPS installed: Yes"
159
else
160
	echo "CUPS installed: No"
161
fi
162
if test $hacms = yes; then
163
	echo "LittleCMS installed: Yes"
164
else
165
	echo "LittleCMS installed: No"
166
fi
167
if test $hastif = yes; then
168
	echo "TiffLib installed: Yes"
169
else
170
	echo "TiffLib installed: No"
171
fi
172
echo ""
173
echo "Start make now."