source: projects/synaptic/trunk/configure.in @ 280

Revision 280, 5.4 KB checked in by yasumichi, 13 years ago (diff)

first import

Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(configure.in)
3
4AM_INIT_AUTOMAKE(synaptic, 0.57.2)
5AM_CONFIG_HEADER(config.h)
6AM_MAINTAINER_MODE
7
8dnl Checks for programs.
9AC_ISC_POSIX
10AC_PROG_CC
11AM_PROG_CC_STDC
12AC_HEADER_STDC
13AC_PROG_CXX
14AC_PROG_MAKE_SET
15AC_PROG_RANLIB
16
17dnl i18n
18ALL_LINGUAS="ar pt_BR es fr de tr zh_CN zh_HK zh_TW ru nl ja be it pl cs hu sr sr@Latn da he ca ko bg no nb sl pt_PT lt el xh mk"
19AM_GLIB_GNU_GETTEXT
20GETTEXT_PACKAGE=synaptic
21AC_SUBST(GETTEXT_PACKAGE)
22AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[description])
23AC_PROG_INTLTOOL([0.23])
24synapticlocaledir='${prefix}/${DATADIRNAME}/locale'
25AC_SUBST(synapticlocaledir)
26     
27dnl check for xmlto
28AC_CHECK_PROG(XMLTO, xmlto, yes, no)
29if test x"$XMLTO" == xno; then
30        AC_MSG_ERROR([You need xmlto to build the documentation. Apt-get it or download it from http://cyberelk.net/tim/xmlto/])
31fi
32
33dnl ask for wings
34dnl AC_ARG_WITH(wings,
35dnl     [--with-wings   build with WINGs gui (obsolete)],
36dnl     [AC_CHECK_PROG(WINGS, get-wings-flags, yes, no)
37dnl     if test x"$WINGS" == xno; then
38dnl        AC_MSG_ERROR([WINGs is not installed])
39dnl     fi
40dnl     ]
41dnl )
42dnl if test x"$WINGS" = xyes; then
43dnl     BUILD_wings="wings"
44dnl     WINGS_LIBS=`get-wings-flags --ldflags`
45dnl     WINGS_LIBS="$GUI_LIBS `get-wings-flags --libs`"
46dnl     WINGS_HDRS=`get-wings-flags --cflags`
47dnl     AC_SUBST(WINGS_LIBS)
48dnl     AC_SUBST(WINGS_HDRS)
49dnl fi
50dnl AC_SUBST(BUILD_wings)
51
52
53dnl Checks for gtk
54dnl if test -z "$BUILD_wings" ; then
55        pkg_modules="gtk+-2.0 >= 2.4.0, libglade-2.0 >= 2.0.0, pango >= 1.0.0, glib-2.0"
56        PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
57        BUILD_gtk="gtk"
58dnl fi
59
60AC_SUBST(PACKAGE_CFLAGS)
61AC_SUBST(PACKAGE_LIBS)
62AC_SUBST(BUILD_gtk)
63
64dnl if test x"$WINGS" = xno; then
65if test x"$GTK" = xno; then
66        AC_MSG_ERROR([ Gtk is not installed, you need to install it to get a GUI])
67fi
68dnl fi
69
70
71
72
73dnl Check for rpm version
74dnl =====================
75rpm_version="none"
76AC_MSG_CHECKING(RPM version)
77SAVE_LIBS="$LIBS"
78SAVE_CPPFLAGS="$CPPFLAGS"
79
80RPM_HDRS=""
81LIBS="$SAVE_LIBS -lrpmio -lrpmdb -lpopt"
82CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm"
83AC_CHECK_HEADER(rpm/rpmlib.h,
84      [AC_CHECK_LIB(rpm,rpmdbInitIterator,
85        [AC_DEFINE(HAVE_RPM, 1, [whether RPM is present])
86         RPM_LIBS="-lrpm -lrpmio -lrpmdb -lpopt"
87         SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm"
88         RPM_HDRS="-I/usr/include/rpm"
89         rpm_version="4"])])
90
91if test $rpm_version = "none"; then
92LIBS="$SAVE_LIBS -lpopt"
93CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm"
94AC_CHECK_HEADER(rpm/rpmlib.h,
95      [AC_CHECK_LIB(rpm,rpmdbOpen,
96        [AC_DEFINE(HAVE_RPM, 1, [wheter RPM is present])
97         RPM_LIBS="-lrpm -lpopt"
98         SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm"
99         RPM_HDRS="-I/usr/include/rpm"
100         rpm_version="3"])])
101fi
102
103AC_SUBST(RPM_LIBS)
104AC_SUBST(RPM_HDRS)
105CPPFLAGS="$SAVE_CPPFLAGS"
106LIBS="$SAVE_LIBS"
107AC_MSG_RESULT("RPM version is $rpm_version")
108
109AC_MSG_CHECKING(for --enable-scripts)
110AC_ARG_ENABLE([scripts],
111              AC_HELP_STRING(--enable-scripts, enable the extension system),
112              [enable_scripts="$enableval"],[enable_scripts="no"])
113if test "$enable_scripts" != "no"; then
114  AC_MSG_RESULT(no)
115  AC_DEFINE(WITH_LUA, 1,
116            [Define if you want to enable the extension system.])
117else
118  AC_MSG_RESULT(yes)
119fi
120AM_CONDITIONAL(WITH_LUA, test "$enable_scripts" != "no")
121
122DEB_HDRS=""
123AC_SUBST(DEB_HDRS)
124DEB_LIBS=""
125AC_SUBST(DEB_LIBS)
126
127
128dnl Checks for header files.
129AC_HEADER_STDC
130
131AC_CHECK_HEADERS(unistd.h libintl.h iconv.h)
132
133AC_LANG_CPLUSPLUS
134AC_CHECK_HEADER(apt-pkg/configuration.h)
135
136if test x$ac_cv_header_apt_pkg_configuration_h != xyes; then
137        AC_ERROR([You need the apt-pkg headers installed to compile synaptic.])
138fi
139
140AC_LANG_C
141
142dnl Checks for typedefs, structures, and compiler characteristics.
143AC_C_CONST
144AC_C_INLINE
145
146
147
148dnl Checks for library functions.
149AC_FUNC_STRCOLL
150AC_CHECK_FUNCS(regcomp strdup iconv)
151
152AC_ARG_WITH(pkg-hold,
153        [--with-pkg-hold   build with experimental package "hold" feature],
154        AC_DEFINE(SYNAPTIC_PKG_HOLD, 1, [build with package pin feature] )
155)
156
157AC_ARG_WITH(apt-authentication,
158        [--with-apt-authentication  build with support for apt authentication],
159        AC_DEFINE(WITH_APT_AUTH, 1, [build with apt auth support] )
160)
161
162AC_ARG_WITH(nice-dpkg-status,
163        [--with-nice-dpkg-status build with support for dpkg progress bar],
164        [pkg_modules="vte >= 0.10.11"
165        PKG_CHECK_MODULES(VTE, [$pkg_modules])
166        AC_DEFINE(WITH_DPKG_STATUSFD, 1, [build with dpkg progress bar] )
167        ]
168)
169
170
171AC_ARG_WITH(debtags,
172        [--with-debtags-support   build with experimental debtags support],
173        [AC_DEFINE(HAVE_DEBTAGS, 1, [build with debtags support])
174        LIBTAGCOLL_DEFS
175        ]
176)
177
178dnl check for libvte
179AC_ARG_WITH(vte,
180              [--with-vte  compile with libvte support (terminal output)],
181              [pkg_modules="vte >= 0.10.11"
182              PKG_CHECK_MODULES(VTE, [$pkg_modules])
183              AC_DEFINE(HAVE_VTE, 1, [build with VTE as output terminal])
184              AC_DEFINE(HAVE_TERMINAL, 1, [build with a terminal widget])
185              AC_SUBST(VTE_CFLAGS)
186              AC_SUBST(VTE_LIBS)
187              ]
188              )
189
190AC_LANG([C++])
191AC_CHECK_HEADER(apt-pkg/cdrom.h,
192                AC_DEFINE(HAVE_APTPKG_CDROM, 1,
193                [whether apt-pkg/cdrom.h is present]) )
194
195
196AC_OUTPUT([
197common/Makefile
198gtk/Makefile
199data/Makefile
200man/Makefile
201pixmaps/Makefile
202po/Makefile.in
203help/Makefile
204help/C/Makefile
205help/es/Makefile
206doc/Makefile
207doc/html/Makefile
208doc/html/C/Makefile
209doc/html/es/Makefile
210Makefile
211],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
212
213
Note: See TracBrowser for help on using the repository browser.