Subversion Repositories Scribus

Rev

Rev 63 | Rev 75 | 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)
68 Franz 16
AM_INIT_AUTOMAKE(scribus,1.1.1)
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)
49
 
3 paul 50
LIBFREETYPE_LIBS=""
51
LIBFREETYPE_CFLAGS=""
52
 
53
FREETYPE_CONFIG=""
68 Franz 54
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 55
 
68 Franz 56
hafree=no
3 paul 57
if test -n "$FREETYPE_CONFIG"; then
59 Franz 58
	LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
59
  LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
68 Franz 60
	AC_CHECK_LIB(freetype, FT_Get_First_Char, [hafree=yes],[hafree=no])
61
	AC_CHECK_LIB(freetype, FT_Get_Next_Char, [hafree=yes],[hafree=no])
62
	if test $hafree = yes; then
63
		AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])
64
	else
65
  	AC_MSG_ERROR([You need at least freetype 2.1.0])
66
	fi
59 Franz 67
	AC_SUBST(LIBFREETYPE_LIBS)
68
	AC_SUBST(LIBFREETYPE_CFLAGS)
69
else
68 Franz 70
  AC_MSG_ERROR([You need at least freetype 2.1.0])
3 paul 71
fi
72
 
73
AC_CHECK_LIB(socket,socket,
74
if test "$uname" != "IRIX"; then
75
	LIBS="-lsocket $LIBS"
76
else
77
	echo "Not using -lsocket since you are running IRIX."
78
fi)
79
AC_CHECK_LIB(nsl,gethostbyaddr,
80
if test "$uname" != "IRIX"; then
81
	LIBS="-lnsl $LIBS"
82
else
83
	echo "Not using -lnsl since you are running IRIX."
84
fi)
85
LIBCUPS=""
86
hacups=
87
AC_CHECK_LIB(cups, httpConnect, [LIBCUPS="-lcups";hacups=yes],[LIBCUPS="";hacups=no])
88
AC_SUBST(LIBCUPS)
89
LIBLCMS=""
90
hacms=
91
AC_CHECK_LIB(lcms, _cmsChannelsOf, [LIBLCMS="-llcms";hacms=yes],[LIBLCMS="";hacms=no])
92
hacmsh=
93
AC_CHECK_HEADER(lcms.h, [hacmsh=yes],[hacmsh=no])
94
if test $hacmsh = no; then
95
	AC_CHECK_HEADER(lcms/lcms.h, [hacmsh=yes],[hacmsh=no])
44 Franz 96
	if test $hacmsh = yes; then
97
 		AC_DEFINE_UNQUOTED(CMS_INC, "lcms/lcms.h", [ColorManagementInclude])
98
	fi
99
else
100
 AC_DEFINE_UNQUOTED(CMS_INC, "lcms.h", [ColorManagementInclude])
3 paul 101
fi
102
AC_SUBST(LIBLCMS)
103
if test $hacms = yes && test $hacmsh = yes; then
104
 AC_DEFINE_UNQUOTED(HAVE_CMS, 1, [ColorManagement])
105
fi
106
LIBTIFF=""
107
hastif=
108
AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no])
109
AC_SUBST(LIBTIFF)
110
if test $hastif = yes; then
111
 AC_DEFINE_UNQUOTED(HAVE_TIFF, 1, [Tifflib])
112
fi
113
LIBDL2=""
114
AC_CHECK_LIB(c, dlopen, [LIBDL2="-lc"],[LIBDL2=""])
115
AC_SUBST(LIBDL2)
116
 
117
dnl generate the config header
118
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
119
 
120
AC_DEFINE_UNQUOTED(PREL, "$prefix", [Dataprefix])
121
dnl Checks for programs.
122
AC_CHECK_COMPILERS
123
AC_ENABLE_SHARED(yes)
124
AC_ENABLE_STATIC(no)
125
KDE_PROG_LIBTOOL
126
 
127
AC_CHECK_HEADER(cups/cups.h, [foo=""],[hacups=no])
128
if test $hacups = yes; then
129
 AC_DEFINE_UNQUOTED(HAVE_CUPS, 1, [Cups])
130
fi
131
 
132
all_libraries="$all_libraries $USER_LDFLAGS"
133
all_includes="$all_includes $USER_INCLUDES"
134
AC_SUBST(all_includes)
135
AC_SUBST(all_libraries)
136
 
137
 
138
AC_PATH_QT
139
 
140
AC_CONFIG_FILES([Makefile])
141
AC_CONFIG_FILES([scribus/Makefile])
142
AC_CONFIG_FILES([scribus/icons/Makefile])
143
AC_CONFIG_FILES([scribus/libabout/Makefile])
144
AC_CONFIG_FILES([scribus/libprefs/Makefile])
145
AC_CONFIG_FILES([scribus/plugins/libchar/Makefile])
21 Franz 146
AC_CONFIG_FILES([scribus/plugins/svgexplugin/Makefile])
68 Franz 147
AC_CONFIG_FILES([scribus/plugins/svgimplugin/Makefile])
23 Franz 148
AC_CONFIG_FILES([scribus/plugins/printpreview/Makefile])
3 paul 149
AC_CONFIG_FILES([scribus/plugins/Makefile])
150
AC_CONFIG_FILES([scribus/libpostscript/Makefile])
151
AC_CONFIG_FILES([scribus/profiles/Makefile])
152
AC_CONFIG_FILES([scribus/libpdf/Makefile])
153
AC_CONFIG_FILES([scribus/dicts/Makefile])
154
AC_CONFIG_FILES([scribus/qm/Makefile])
155
AC_CONFIG_FILES([scribus/po/Makefile])
156
AC_OUTPUT
157
echo "Configuration Summary:"
158
echo ""
59 Franz 159
if test $hafree = yes; then
160
	echo "FreeType2 installed: Yes"
161
else
3 paul 162
	echo "FreeType2 installed: No"
163
fi
164
if test $hacups = yes; then
165
	echo "CUPS installed: Yes"
166
else
167
	echo "CUPS installed: No"
168
fi
169
if test $hacms = yes; then
170
	echo "LittleCMS installed: Yes"
171
else
172
	echo "LittleCMS installed: No"
173
fi
174
if test $hastif = yes; then
175
	echo "TiffLib installed: Yes"
176
else
177
	echo "TiffLib installed: No"
178
fi
179
echo ""
180
echo "Start make now."