Subversion Repositories Scribus

Rev

Rev 102 | Rev 106 | 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)
92 Franz 16
AM_INIT_AUTOMAKE(scribus,1.1.3cvs)
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])
68 Franz 30
 
31
LIBART_LIBS=""
32
LIBART_CFLAGS=""
33
LIBART_CONFIG=""
34
AC_PATH_PROG(LIBART_CONFIG, libart2-config,[AC_MSG_ERROR([Could not find libart anywhere, check http://www.levien.com/libart/], [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin])
35
])
36
if test -n "$LIBART_CONFIG"; then
37
  vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
38
  if test -n "$vers" && test "$vers" -ge 2003008
39
  then
40
     LIBART_LIBS="`$LIBART_CONFIG --libs`"
41
     LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
42
     AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
43
  else
44
     AC_MSG_ERROR([You need at least libart 2.3.8])
45
  fi
46
fi
47
AC_SUBST(LIBART_LIBS)
48
AC_SUBST(LIBART_CFLAGS)
86 Franz 49
AC_C_BIGENDIAN
68 Franz 50
 
3 paul 51
LIBFREETYPE_LIBS=""
52
LIBFREETYPE_CFLAGS=""
53
 
54
FREETYPE_CONFIG=""
68 Franz 55
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, [AC_MSG_ERROR([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])
3 paul 56
 
68 Franz 57
hafree=no
3 paul 58
if test -n "$FREETYPE_CONFIG"; then
59 Franz 59
	LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
60
  LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
68 Franz 61
	AC_CHECK_LIB(freetype, FT_Get_First_Char, [hafree=yes],[hafree=no])
62
	AC_CHECK_LIB(freetype, FT_Get_Next_Char, [hafree=yes],[hafree=no])
63
	if test $hafree = yes; then
64
		AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])
65
	else
66
  	AC_MSG_ERROR([You need at least freetype 2.1.0])
67
	fi
59 Franz 68
	AC_SUBST(LIBFREETYPE_LIBS)
69
	AC_SUBST(LIBFREETYPE_CFLAGS)
70
else
68 Franz 71
  AC_MSG_ERROR([You need at least freetype 2.1.0])
3 paul 72
fi
73
 
74
AC_CHECK_LIB(socket,socket,
75
if test "$uname" != "IRIX"; then
76
	LIBS="-lsocket $LIBS"
77
else
78
	echo "Not using -lsocket since you are running IRIX."
79
fi)
80
AC_CHECK_LIB(nsl,gethostbyaddr,
81
if test "$uname" != "IRIX"; then
82
	LIBS="-lnsl $LIBS"
83
else
84
	echo "Not using -lnsl since you are running IRIX."
85
fi)
86
LIBCUPS=""
87
hacups=
88
AC_CHECK_LIB(cups, httpConnect, [LIBCUPS="-lcups";hacups=yes],[LIBCUPS="";hacups=no])
89
AC_SUBST(LIBCUPS)
90
LIBLCMS=""
91
hacms=
92
AC_CHECK_LIB(lcms, _cmsChannelsOf, [LIBLCMS="-llcms";hacms=yes],[LIBLCMS="";hacms=no])
93
hacmsh=
94
AC_CHECK_HEADER(lcms.h, [hacmsh=yes],[hacmsh=no])
95
if test $hacmsh = no; then
96
	AC_CHECK_HEADER(lcms/lcms.h, [hacmsh=yes],[hacmsh=no])
44 Franz 97
	if test $hacmsh = yes; then
98
 		AC_DEFINE_UNQUOTED(CMS_INC, "lcms/lcms.h", [ColorManagementInclude])
99
	fi
100
else
101
 AC_DEFINE_UNQUOTED(CMS_INC, "lcms.h", [ColorManagementInclude])
3 paul 102
fi
103
AC_SUBST(LIBLCMS)
104
if test $hacms = yes && test $hacmsh = yes; then
105
 AC_DEFINE_UNQUOTED(HAVE_CMS, 1, [ColorManagement])
106
fi
107
LIBTIFF=""
108
hastif=
82 Franz 109
AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no],[-lm])
3 paul 110
AC_SUBST(LIBTIFF)
111
if test $hastif = yes; then
112
 AC_DEFINE_UNQUOTED(HAVE_TIFF, 1, [Tifflib])
113
fi
114
LIBDL2=""
115
AC_CHECK_LIB(c, dlopen, [LIBDL2="-lc"],[LIBDL2=""])
116
AC_SUBST(LIBDL2)
117
 
118
dnl generate the config header
119
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
120
 
121
AC_DEFINE_UNQUOTED(PREL, "$prefix", [Dataprefix])
122
dnl Checks for programs.
123
AC_CHECK_COMPILERS
124
AC_ENABLE_SHARED(yes)
125
AC_ENABLE_STATIC(no)
126
KDE_PROG_LIBTOOL
96 Franz 127
hapy=no
99 Franz 128
hapython=yes
82 Franz 129
KDE_CHECK_PYTHON(1.5)
3 paul 130
 
96 Franz 131
COMPILE_PYTHON=no
132
AC_ARG_WITH(python, [  --without-python     Do not compile the Scripter Plugin],[ COMPILE_PYTHON=no ],[ COMPILE_PYTHON=yes ])
133
if test $hapy = no; then
134
	COMPILE_PYTHON=no
135
fi
99 Franz 136
if test $hapy = yes; then
137
  AC_CHECK_HEADER(python2.3/Python.h, [foo=""],[hapython=no])
138
   if test $hapython = yes; then
139
    AC_DEFINE_UNQUOTED(HAVE_PYTHON_23, 1, [Python])
140
   fi
141
fi
96 Franz 142
AM_CONDITIONAL(COMPILE_PYTHON, test x$COMPILE_PYTHON = xyes)
143
 
3 paul 144
AC_CHECK_HEADER(cups/cups.h, [foo=""],[hacups=no])
145
if test $hacups = yes; then
146
 AC_DEFINE_UNQUOTED(HAVE_CUPS, 1, [Cups])
147
fi
148
 
149
all_libraries="$all_libraries $USER_LDFLAGS"
150
all_includes="$all_includes $USER_INCLUDES"
151
AC_SUBST(all_includes)
152
AC_SUBST(all_libraries)
153
 
154
 
155
AC_PATH_QT
156
 
157
AC_CONFIG_FILES([Makefile])
158
AC_CONFIG_FILES([scribus/Makefile])
159
AC_CONFIG_FILES([scribus/icons/Makefile])
160
AC_CONFIG_FILES([scribus/libabout/Makefile])
161
AC_CONFIG_FILES([scribus/libprefs/Makefile])
162
AC_CONFIG_FILES([scribus/plugins/libchar/Makefile])
21 Franz 163
AC_CONFIG_FILES([scribus/plugins/svgexplugin/Makefile])
68 Franz 164
AC_CONFIG_FILES([scribus/plugins/svgimplugin/Makefile])
23 Franz 165
AC_CONFIG_FILES([scribus/plugins/printpreview/Makefile])
82 Franz 166
AC_CONFIG_FILES([scribus/plugins/scriptplugin/Makefile])
167
AC_CONFIG_FILES([scribus/plugins/scriptplugin/doc/Makefile])
168
AC_CONFIG_FILES([scribus/plugins/scriptplugin/doc/en/Makefile])
169
AC_CONFIG_FILES([scribus/plugins/scriptplugin/samples/Makefile])
3 paul 170
AC_CONFIG_FILES([scribus/plugins/Makefile])
171
AC_CONFIG_FILES([scribus/libpostscript/Makefile])
172
AC_CONFIG_FILES([scribus/profiles/Makefile])
173
AC_CONFIG_FILES([scribus/libpdf/Makefile])
174
AC_CONFIG_FILES([scribus/dicts/Makefile])
175
AC_CONFIG_FILES([scribus/qm/Makefile])
176
AC_CONFIG_FILES([scribus/po/Makefile])
177
AC_OUTPUT
178
echo "Configuration Summary:"
179
echo ""
59 Franz 180
if test $hafree = yes; then
181
	echo "FreeType2 installed: Yes"
182
else
3 paul 183
	echo "FreeType2 installed: No"
184
fi
185
if test $hacups = yes; then
103 Franz 186
	echo "CUPS installed:      Yes"
3 paul 187
else
103 Franz 188
	echo "CUPS installed:      No"
3 paul 189
fi
190
if test $hacms = yes; then
191
	echo "LittleCMS installed: Yes"
192
else
193
	echo "LittleCMS installed: No"
194
fi
195
if test $hastif = yes; then
103 Franz 196
	echo "TiffLib installed:   Yes"
3 paul 197
else
103 Franz 198
	echo "TiffLib installed:   No"
3 paul 199
fi
96 Franz 200
if test $COMPILE_PYTHON = no; then
102 Franz 201
	echo "The Scripter-Plugin will not be compiled."
99 Franz 202
else
103 Franz 203
	if test $hapython = yes; then
204
  	echo "Using Python 2.3"
205
	else
206
  	echo "Using Python < 2.3"
207
	fi
99 Franz 208
fi
3 paul 209
echo ""
210
echo "Start make now."