Subversion Repositories Scribus

Rev

Rev 12 | Go to most recent revision | Details | 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)
16
AM_INIT_AUTOMAKE(scribus,0.9.10)
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])
73
fi
74
AC_SUBST(LIBLCMS)
75
if test $hacms = yes && test $hacmsh = yes; then
76
 AC_DEFINE_UNQUOTED(HAVE_CMS, 1, [ColorManagement])
77
fi
78
LIBTIFF=""
79
hastif=
80
AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no])
81
AC_SUBST(LIBTIFF)
82
if test $hastif = yes; then
83
 AC_DEFINE_UNQUOTED(HAVE_TIFF, 1, [Tifflib])
84
fi
85
LIBDL2=""
86
AC_CHECK_LIB(c, dlopen, [LIBDL2="-lc"],[LIBDL2=""])
87
AC_SUBST(LIBDL2)
88
 
89
dnl generate the config header
90
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
91
 
92
AC_DEFINE_UNQUOTED(PREL, "$prefix", [Dataprefix])
93
dnl Checks for programs.
94
AC_CHECK_COMPILERS
95
AC_ENABLE_SHARED(yes)
96
AC_ENABLE_STATIC(no)
97
KDE_PROG_LIBTOOL
98
 
99
AC_CHECK_HEADER(cups/cups.h, [foo=""],[hacups=no])
100
if test $hacups = yes; then
101
 AC_DEFINE_UNQUOTED(HAVE_CUPS, 1, [Cups])
102
fi
103
 
104
dnl AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
105
all_libraries="$all_libraries $USER_LDFLAGS"
106
all_includes="$all_includes $USER_INCLUDES"
107
AC_SUBST(all_includes)
108
AC_SUBST(all_libraries)
109
 
110
dnl for NLS support. Call them in this order!
111
dnl WITH_NLS is for the po files
112
dnl AM_KDE_WITH_NLS
113
 
114
AC_PATH_QT
115
 
116
dnl Perform program name transformation
117
dnl AC_ARG_PROGRAM
118
 
119
dnl PACKAGE set before
120
 
121
dnl KDE_CREATE_SUBDIRSLIST
122
 
123
dnl add here all your Makefiles. This are created by configure
124
dnl The following line is for Autoconf 2.13, Uncomment it, if you are using this old version
125
dnl and delete all lines with AC_CONFIG_FILES
126
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 )
127
 
128
dnl This stuff is for Autoconf 2.5 and above
129
AC_CONFIG_FILES([Makefile])
130
AC_CONFIG_FILES([scribus/Makefile])
131
AC_CONFIG_FILES([scribus/icons/Makefile])
132
AC_CONFIG_FILES([scribus/libabout/Makefile])
133
AC_CONFIG_FILES([scribus/libprefs/Makefile])
134
AC_CONFIG_FILES([scribus/plugins/libchar/Makefile])
135
AC_CONFIG_FILES([scribus/plugins/Makefile])
136
AC_CONFIG_FILES([scribus/libpostscript/Makefile])
137
AC_CONFIG_FILES([scribus/profiles/Makefile])
138
AC_CONFIG_FILES([scribus/libpdf/Makefile])
139
AC_CONFIG_FILES([scribus/dicts/Makefile])
140
AC_CONFIG_FILES([scribus/qm/Makefile])
141
AC_CONFIG_FILES([scribus/po/Makefile])
142
AC_OUTPUT
143
echo "Configuration Summary:"
144
echo ""
145
if test -z "$LIBFREETYPE_LIBS"; then
146
	echo "FreeType2 installed: No"
147
else
148
	echo "FreeType2 installed: Yes"
149
fi
150
if test $hacups = yes; then
151
	echo "CUPS installed: Yes"
152
else
153
	echo "CUPS installed: No"
154
fi
155
if test $hacms = yes; then
156
	echo "LittleCMS installed: Yes"
157
else
158
	echo "LittleCMS installed: No"
159
fi
160
if test $hastif = yes; then
161
	echo "TiffLib installed: Yes"
162
else
163
	echo "TiffLib installed: No"
164
fi
165
echo ""
166
echo "Start make now."