File: configure.in

package info (click to toggle)
scribus 1.2.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 29,928 kB
  • ctags: 8,814
  • sloc: cpp: 98,550; sh: 16,484; ansic: 10,295; perl: 2,818; makefile: 1,340; python: 1,177; xml: 83
file content (297 lines) | stat: -rw-r--r-- 9,816 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================

# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas

dnl Process this file with autoconf to produce a configure script.

AC_INIT(acinclude.m4) dnl a source file from your sub dir

dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)

AC_CANONICAL_SYSTEM 
AC_ARG_PROGRAM

dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(scribus,1.2.1)

dnl KDE_SET_PREFIX

AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then
  prefix=$ac_default_prefix
  ac_configure_args="$ac_configure_args --prefix $prefix"
fi

LIBART_LIBS=""
LIBART_CFLAGS=""
LIBART_CONFIG=""
AC_PATH_PROG(LIBART_CONFIG, libart2-config,[AC_MSG_ERROR([Could not find libart anywhere, check http://www.levien.com/libart/], [$PATH ${prefix}/bin ${exec_prefix}/bin /usr/local/bin /usr/nekoware/bin /opt/local/bin])
])
if test -n "$LIBART_CONFIG"; then
  vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  if test -n "$vers" && test "$vers" -ge 2003008
  then
     LIBART_LIBS="`$LIBART_CONFIG --libs`"
     LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
     AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
  else
     AC_MSG_ERROR([You need at least libart 2.3.8])
  fi
fi
AC_SUBST(LIBART_LIBS)
AC_SUBST(LIBART_CFLAGS)
AC_C_BIGENDIAN

LIBFREETYPE_LIBS=""
LIBFREETYPE_CFLAGS=""

FREETYPE_CONFIG=""
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, [AC_MSG_ERROR([Could not find libfreetype anywhere, check http://www.freetype.org/])], [$PATH ${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin /usr/nekoware/bin /usr/X11/bin])

hafree=no
if test -n "$FREETYPE_CONFIG"; then
	LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
  LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
	AC_CHECK_LIB(freetype, FT_Get_First_Char, [hafree=yes],[hafree=no], "$LIBFREETYPE_LIBS")
	AC_CHECK_LIB(freetype, FT_Get_Next_Char, [hafree=yes],[hafree=no], "$LIBFREETYPE_LIBS")
	if test $hafree = yes; then
		AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])
	else
  	AC_MSG_ERROR([You need at least freetype 2.1.0])
	fi
	AC_SUBST(LIBFREETYPE_LIBS)
	AC_SUBST(LIBFREETYPE_CFLAGS)
else
  AC_MSG_ERROR([You need at least freetype 2.1.0])
fi
XML_LIBS=""
XML_CFLAGS=""

XML_CONFIG=""
AC_PATH_PROG(XML_CONFIG, xml2-config, [AC_MSG_ERROR([Could not find libxml2 anywhere, check http://www.xmlsoft.org/])], [$PATH ${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin /usr/nekoware/bin /usr/X11/bin])

haxml=no
if test -n "$XML_CONFIG"; then
	XML_LIBS="`$XML_CONFIG --libs`"
	XML_CFLAGS="`$XML_CONFIG --cflags`"
	AC_CHECK_LIB(xml2, attribute, [haxml=yes],[haxml=no])
	if test $hafree = yes; then
		AC_DEFINE_UNQUOTED(HAVE_XML, 1, [Defines if your system has the libxml2 library])
		AC_SUBST(XML_LIBS)
		AC_SUBST(XML_CFLAGS)
	fi
	vers=`$XML_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  	if test -n "$vers" && test "$vers" -ge 2006000
	then
		AC_DEFINE_UNQUOTED(HAVE_XML26, 1, [Defines if your system has the libxml2 library6])
	fi
fi

AC_CHECK_LIB(socket,socket,
if test "$uname" != "IRIX"; then
	LIBS="-lsocket $LIBS"
else
	echo "Not using -lsocket since you are running IRIX."
fi)
AC_CHECK_LIB(nsl,gethostbyaddr,
if test "$uname" != "IRIX"; then
	LIBS="-lnsl $LIBS"
else
	echo "Not using -lnsl since you are running IRIX."
fi)
LIBCUPS=""
hacups=
AC_CHECK_PROG(hacups, cups-config, yes)
if test x"$hacups" = x"yes"
then
	LIBCUPS="`cups-config --libs`"
	AC_SUBST(LIBCUPS)
fi

LIBLCMS=""
hacms=
AC_CHECK_LIB(lcms, _cmsChannelsOf, [LIBLCMS="-llcms";hacms=yes],[LIBLCMS="";hacms=no],[-lm])
hacmsh=
AC_CHECK_HEADER(lcms.h, [hacmsh=yes],[hacmsh=no])
if test $hacmsh = no; then
	AC_CHECK_HEADER(lcms/lcms.h, [hacmsh=yes],[hacmsh=no])
	if test $hacmsh = yes; then
 		AC_DEFINE_UNQUOTED(CMS_INC, "lcms/lcms.h", [ColorManagementInclude])
	fi
else
 AC_DEFINE_UNQUOTED(CMS_INC, "lcms.h", [ColorManagementInclude])
fi
AC_SUBST(LIBLCMS)
if test $hacms = yes && test $hacmsh = yes; then
 AC_DEFINE_UNQUOTED(HAVE_CMS, 1, [ColorManagement])
fi
LIBTIFF=""
hastif=
AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no],[-lm])
AC_SUBST(LIBTIFF)
if test $hastif = yes; then
 AC_DEFINE_UNQUOTED(HAVE_TIFF, 1, [Tifflib])
fi
LIBDL2=""
AC_CHECK_LIB(c, dlopen, [LIBDL2="-lc"],[LIBDL2=""])
AC_SUBST(LIBDL2)

dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done

dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL

hapython=yes
kde_python_link_found=no
KDE_CHECK_PYTHON(1.5)
COMPILE_PYTHON=no
AC_ARG_WITH(python, [  --without-python     Do not compile the Scripter Plugin],[ COMPILE_PYTHON=no ],[ COMPILE_PYTHON=yes ])
if test $kde_python_link_found = no; then
	COMPILE_PYTHON=no
fi
if test $kde_python_link_found = yes; then
  AC_CHECK_HEADER(python2.3/Python.h, [foo=""],[hapython=no])
   if test $hapython = yes; then
    AC_DEFINE_UNQUOTED(HAVE_PYTHON_23, 1, [Python])
   fi
fi
AM_CONDITIONAL(COMPILE_PYTHON, test x$COMPILE_PYTHON = xyes)

AC_CHECK_HEADER(cups/cups.h, [foo=""],[hacups=no])
if test $hacups = yes; then
 AC_DEFINE_UNQUOTED(HAVE_CUPS, 1, [Cups])
fi

COMPILE_DEBUG=no
AC_ARG_ENABLE(debug, [  --enable-debug     Enables Debug-Code],
[if test "x$enable_debug" = "xyes"; then
    COMPILE_DEBUG=yes
    CXXFLAGS="$CXXFLAGS -g3 -fno-inline -O0 "
    CFLAGS="$CFLAGS -g3 -fno-inline  -O0 "
fi])
AM_CONDITIONAL(COMPILE_DEBUG, test x$COMPILE_DEBUG = xyes)


all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)

AC_PATH_QT

KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ scribus/Makefile ])
AC_CONFIG_FILES([ scribus/dicts/Makefile ])
AC_CONFIG_FILES([ scribus/doc/Makefile ])
AC_CONFIG_FILES([ scribus/doc/en/Makefile ])
AC_CONFIG_FILES([ scribus/doc/en/images/Makefile ])
AC_CONFIG_FILES([ scribus/doc/en/tutorials/Makefile ])
AC_CONFIG_FILES([ scribus/icons/Makefile ])
AC_CONFIG_FILES([ scribus/libabout/Makefile ])
AC_CONFIG_FILES([ scribus/libpdf/Makefile ])
AC_CONFIG_FILES([ scribus/libpostscript/Makefile ])
AC_CONFIG_FILES([ scribus/libprefs/Makefile ])
AC_CONFIG_FILES([ scribus/manpages/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/fileloader/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/fileloader/oodraw/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/fontpreview/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/gettext/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/gettext/csvim/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/gettext/htmlim/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/gettext/sxwim/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/gettext/textfilter/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/gettext/txtim/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/libchar/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/newfromtemplateplugin/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/pixmapexport/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/printpreview/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/psimport/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/saveastemplateplugin/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/scriptplugin/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/scriptplugin/samples/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/scriptplugin/scripts/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/svgexplugin/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/svgimplugin/Makefile ])
AC_CONFIG_FILES([ scribus/po/Makefile ])
AC_CONFIG_FILES([ scribus/profiles/Makefile ])
AC_CONFIG_FILES([ scribus/qm/Makefile ])
AC_CONFIG_FILES([ scribus/templates/Makefile ])
AC_OUTPUT
echo "Configuration Summary:"
echo ""
if test $hafree = yes; then
	echo "FreeType2 installed: Yes"
else
	echo "FreeType2 installed: No"
fi
if test $hacups = yes; then
	echo "CUPS installed:      Yes"
else
	echo "CUPS installed:      No"
fi
if test $hacms = yes; then
	echo "LittleCMS installed: Yes"
else
	echo "LittleCMS installed: No"
fi
if test $hastif = yes; then
	echo "TiffLib installed:   Yes"
else
	echo "TiffLib installed:   No"
fi
if test $haxml = yes; then
	echo "Libxml2 installed:   Yes"
else
	echo "Libxml2 installed:   No"
fi
if test $COMPILE_PYTHON = no; then
	echo "The Scripter-Plugin will not be compiled."
else
	if test $hapython = yes; then
  	echo "Using Python 2.3"
	else
  	echo "Using Python < 2.3"
	fi
fi
echo ""
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
  # And if so, warn when they don't match
  if test "$kde_libs_prefix" != "$given_prefix"; then
    # And if kde doesn't know about the prefix yet
    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
    if test $? -ne 0; then
      echo ""
      echo "Warning: you chose to install this package in $given_prefix,"
      echo "but KDE was found in $kde_libs_prefix."
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
      echo "Then restart KDE."
      echo ""
    fi
  fi
fi

if test "$all_tests" = "bad"; then
  if test ! "$cache_file" = "/dev/null"; then
    echo ""
    echo "Please remove the file $cache_file after changing your setup"
    echo "so that configure will find the changes next time."
    echo ""
  fi
else
  echo ""
  echo "Good - your configure finished. Start make now"
  echo ""
fi