2 # Process this file with autoconf to produce a configure script.
7 [m4_esyscmd_s([./scripts/version.sh])],
9 AC_CONFIG_SRCDIR([frontends/conf/conf.c])
10 # Use a config.h to avoid brazilions -DHAVE_FOO on compile lines
11 AC_CONFIG_HEADERS([config.h])
12 AC_CONFIG_AUX_DIR([scripts])
14 # Checks for programs.
19 # Checks for libraries.
22 # Checks for header files.
24 # The folowing AC_CHECK_HEADERS was a single big line
25 AC_CHECK_HEADERS([ fcntl.h libintl.h limits.h locale.h ])
26 AC_CHECK_HEADERS([ stdlib.h string.h sys/time.h unistd.h ])
28 # Checks for typedefs, structures, and compiler characteristics.
33 # Checks for library functions.
37 # The following AC_CHECK_FUNCS was a single big line
38 AC_CHECK_FUNCS([ bzero memmove memset ])
39 AC_CHECK_FUNCS([ strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strspn strtol ])
40 AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
42 # End of the autoscan-detected stuff
43 #---------------------------------------------------------------------------
45 #----------------------------------------
47 # Although there is a default (="linux") in the code, we do provide
48 # a default here, to get a consistent autostuff behavior
52 [--enable-package-name],
53 [set the package name (default=kconfig-frontends)])],
56 [yes], [package_name=$PACKAGE_NAME],
57 [no], [package_name=],
58 [package_name=$enableval])])
59 AC_SUBST([package_name], [${package_name=$PACKAGE_NAME}])
61 #----------------------------------------
62 # Options to selectively enable/disable frontends
63 # All are selected by default
68 [conf, the stdin-based frontend (default=enabled)])])
69 AC_SUBST([enable_conf], [${enable_conf:-auto}])
74 [mconf, the traditional ncurses-based frontend (default=enabled)])])
75 AC_SUBST([enable_mconf], [${enable_mconf:-auto}])
80 [nconf, the modern ncurses-based frontend (default=enabled)])])
81 AC_SUBST([enable_nconf], [${enable_nconf:-auto}])
86 [gconf, the GTK-based frontend (default=enabled)])])
87 AC_SUBST([enable_gconf], [${enable_gconf:-auto}])
92 [qconf, the QT-based frontend (default=enabled)])])
93 AC_SUBST([enable_qconf], [${enable_qconf:-auto}])
95 #----------------------------------------
104 [AC_MSG_ERROR([can not find gperf])])
105 AC_SUBST([AM_LFLAGS], ["-L -P zconf"])
106 AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"])
108 #----------------------------------------
109 # Check for gettext, for the kconfig frontends
113 [ac_ct_gettext_hdr=$ac_header; break],
114 [AC_MSG_WARN([libintl is missing, frontends will not be localised])])
116 [test -n "$ac_ct_gettext_hdr"],
119 [AC_MSG_WARN([gettext is missing, frontends will not be localised])
120 GETTEXT=-DKBUILD_NO_NLS],
121 [#include <$ac_ct_gettext_hdr>])])
123 #----------------------------------------
124 # Check for ncurses, for the mconf & nconf frontends
126 ["$enable_mconf":"$enable_nconf"],
127 [yes:*], [need_curses=yes],
128 [*:yes], [need_curses=yes],
129 [auto:*], [need_curses=auto],
130 [*:auto], [need_curses=auto],
134 [test "$need_curses" = "yes" -o "$need_curses" = "auto"],
135 [AC_SUBST([CURSES_LOC])
136 AC_SUBST([ncurses_LIBS])
139 [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
140 [CURSES_LOC=$ac_header; break])
142 [test -z "$CURSES_LOC"],
144 [test "$need_curses" = "yes"],
145 [AC_MSG_ERROR([could not find curses headers (frontends: mconf/nconf)])],
149 [ncursesw ncurses curses],
150 [ac_ct_curses_lib_found=yes; break])
152 [test -z "$ac_ct_curses_lib_found"],
154 [test "$need_curses" = "yes"],
155 [AC_MSG_ERROR([could not find curses library (frontends: mconf/nconf)])],
161 [test "$has_curses" = "no" ],
162 [enable_mconf=no; enable_nconf=no])
164 #----------------------------------------
165 # Check for libpanel and libmenu, for the nconf frontend
166 [need_panel_menu="$enable_nconf"]
169 [test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"],
170 [AC_SUBST([ncurses_extra_LIBS])
175 [ac_ct_panel_lib_found=yes; break])
177 [test -z "$ac_ct_panel_lib_found"],
179 [test "$need_panel_menu" = "yes"],
180 [AC_MSG_ERROR([could not find libpanel library (frontend: nconf)])],
181 [has_panel_menu=no])])
185 [ac_ct_menu_lib_found=yes; break])
187 [test -z "$ac_ct_panel_lib_found"],
189 [test "$need_panel_menu" = "yes"],
190 [AC_MSG_ERROR([could not find libmenu library (frontend: nconf)])],
191 [has_panel_menu=no])])
192 ncurses_extra_LIBS="$LIBS"
196 [test "$has_panel_menu" = "no" ],
199 #----------------------------------------
200 # Check if the lxdialog library should be built
202 [test "$enable_mconf" = "yes" -o "$enable_mconf" = "auto"],
206 #----------------------------------------
207 # Check pkg-config if needed
209 ["$enable_gconf":"$enable_qconf"],
210 [yes:*], [need_pkgconfig=yes],
211 [*:yes], [need_pkgconfig=yes],
212 [auto:*], [need_pkgconfig=yes],
213 [*:auto], [need_pkgconfig=yes],
214 [need_pkgconfig=no ])
217 [test "$need_pkgconfig" = "yes"],
218 [PKG_PROG_PKG_CONFIG()])
220 #----------------------------------------
221 # Check headers and libs for gconf
222 [need_gtk="$enable_gconf"]
225 [test "$need_gtk" = "yes" -o "$need_gtk" = "auto"],
228 [gtk+-2.0 gmodule-2.0 libglade-2.0],
231 [test "$need_gtk" = "yes"],
232 [AC_MSG_ERROR([could not find GTK+ headers and/or libraries (frontend: gconf)])],
236 [test "$has_gtk" = "no" ],
239 #----------------------------------------
240 # Check headers and libs for gconf
241 [need_qt="$enable_qconf"]
244 [test "$need_qt" = "yes" -o "$need_qt" = "auto"],
247 [QtCore QtGui Qt3Support],
250 [test "$need_qt" = "yes"],
251 [AC_MSG_ERROR([could not find QT4 headers and/or libraries (frontend: qconf)])],
255 [test "$has_qt" = "no" ],
258 #---------------------------------------------------------------------------
259 # Now, we know what frontends to enable
260 AS_IF([test "$enable_conf" = "auto"], [enable_conf=yes ])
261 AS_IF([test "$enable_gconf" = "auto"], [enable_gconf=yes])
262 AS_IF([test "$enable_mconf" = "auto"], [enable_mconf=yes])
263 AS_IF([test "$enable_nconf" = "auto"], [enable_nconf=yes])
264 AS_IF([test "$enable_qconf" = "auto"], [enable_qconf=yes])
266 #---------------------------------------------------------------------------
272 [test "$enable_conf" = "yes"])
275 [test "$enable_mconf" = "yes"])
278 [test "$enable_nconf" = "yes"])
281 [test "$enable_gconf" = "yes"])
284 [test "$enable_qconf" = "yes"])
287 [test "$need_lxdialog" = "yes"])
289 #---------------------------------------------------------------------------
291 LT_INIT([disable-static])
293 #----------------------------------------
294 # Get the version to apply to the parser shared library
296 [KCONFIGPARSER_LIB_VERSION],
297 [m4_esyscmd_s([./scripts/version.sh --plain])])
299 #----------------------------------------
304 libs/lxdialog/Makefile
307 frontends/conf/Makefile
308 frontends/mconf/Makefile
309 frontends/nconf/Makefile
310 frontends/gconf/Makefile
311 frontends/qconf/Makefile
315 AC_MSG_NOTICE([Configured with:])
316 AC_MSG_NOTICE([- package name: '$package_name'])
317 AC_MSG_NOTICE([- frontends:])
318 AS_IF([test "$enable_conf" = "yes"],
319 [AC_MSG_NOTICE([ - conf: yes])],
320 [AC_MSG_NOTICE([ - conf: no])])
321 AS_IF([test "$enable_gconf" = "yes"],
322 [AC_MSG_NOTICE([ - gconf: yes])],
323 [AC_MSG_NOTICE([ - gconf: no])])
324 AS_IF([test "$enable_mconf" = "yes"],
325 [AC_MSG_NOTICE([ - mconf: yes])],
326 [AC_MSG_NOTICE([ - mconf: no])])
327 AS_IF([test "$enable_nconf" = "yes"],
328 [AC_MSG_NOTICE([ - nconf: yes])],
329 [AC_MSG_NOTICE([ - nconf: no])])
330 AS_IF([test "$enable_qconf" = "yes"],
331 [AC_MSG_NOTICE([ - qconf: yes])],
332 [AC_MSG_NOTICE([ - qconf: no])])
333 AC_MSG_NOTICE([- parser library:])
334 AS_IF([test "$enable_shared" = "yes"],
335 [AC_MSG_NOTICE([ - shared: yes, versioned $KCONFIGPARSER_LIB_VERSION])],
336 [AC_MSG_NOTICE([ - shared: no])])
337 AC_MSG_NOTICE([ - static: $enable_static])