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 #----------------------------------------
46 # Options to selectively enable/disable frontends
47 # All are selected by default
52 [conf, the stdin-based frontend (default=enabled)])])
53 AC_SUBST([enable_conf], [${enable_conf:-auto}])
58 [mconf, the traditional ncurses-based frontend (default=enabled)])])
59 AC_SUBST([enable_mconf], [${enable_mconf:-auto}])
64 [nconf, the modern ncurses-based frontend (default=enabled)])])
65 AC_SUBST([enable_nconf], [${enable_nconf:-auto}])
70 [gconf, the GTK-based frontend (default=enabled)])])
71 AC_SUBST([enable_gconf], [${enable_gconf:-auto}])
76 [qconf, the QT-based frontend (default=enabled)])])
77 AC_SUBST([enable_qconf], [${enable_qconf:-auto}])
79 #----------------------------------------
88 [AC_MSG_ERROR([can not find gperf])])
89 AC_SUBST([AM_LFLAGS], ["-L -P zconf"])
90 AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"])
92 #----------------------------------------
93 # Check for gettext, for the kconfig frontends
97 [ac_ct_gettext_hdr=$ac_header; break],
98 [AC_MSG_WARN([libintl is missing, frontends will not be localised])])
100 [test -n "$ac_ct_gettext_hdr"],
103 [AC_MSG_WARN([gettext is missing, frontends will not be localised])
104 GETTEXT=-DKBUILD_NO_NLS],
105 [#include <$ac_ct_gettext_hdr>])])
107 #----------------------------------------
108 # Check for ncurses, for the mconf & nconf frontends
110 ["$enable_mconf":"$enable_nconf"],
111 [yes:*], [need_curses=yes],
112 [*:yes], [need_curses=yes],
113 [auto:*], [need_curses=auto],
114 [*:auto], [need_curses=auto],
118 [test "$need_curses" = "yes" -o "$need_curses" = "auto"],
119 [AC_SUBST([CURSES_LOC])
121 [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
122 [CURSES_LOC=$ac_header; break])
124 [test -z "$CURSES_LOC"],
126 [test "$need_curses" = "yes"],
127 [AC_MSG_ERROR([could not find curses headers (frontends: mconf/nconf)])],
131 [ncursesw ncurses curses],
132 [ac_ct_curses_lib_found=yes; break])
134 [test -z "$ac_ct_curses_lib_found"],
136 [test "$need_curses" = "yes"],
137 [AC_MSG_ERROR([could not find curses library (frontends: mconf/nconf)])],
141 [test "$has_curses" = "no" ],
142 [enable_mconf=no; enable_nconf=no])
144 #----------------------------------------
145 # Check for libpanel and libmenu, for the nconf frontend
146 [need_panel_menu="$enable_nconf"]
149 [test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"],
153 [ac_ct_panel_lib_found=yes; break])
155 [test -z "$ac_ct_panel_lib_found"],
157 [test "$need_panel_menu" = "yes"],
158 [AC_MSG_ERROR([could not find libpanel library (frontend: nconf)])],
159 [has_panel_menu=no])])
163 [ac_ct_menu_lib_found=yes; break])
165 [test -z "$ac_ct_panel_lib_found"],
167 [test "$need_panel_menu" = "yes"],
168 [AC_MSG_ERROR([could not find libmenu library (frontend: nconf)])],
169 [has_panel_menu=no])])])
172 [test "$has_panel_menu" = "no" ],
175 #----------------------------------------
176 # Check if the lxdialog library should be built
178 [test "$enable_mconf" = "yes" -o "$enable_mconf" = "auto"],
182 #----------------------------------------
183 # Check pkg-config if needed
185 ["$enable_gconf":"$enable_qconf"],
186 [yes:*], [need_pkgconfig=yes],
187 [*:yes], [need_pkgconfig=yes],
188 [auto:*], [need_pkgconfig=yes],
189 [*:auto], [need_pkgconfig=yes],
190 [need_pkgconfig=no ])
193 [test "$need_pkgconfig" = "yes"],
194 [PKG_PROG_PKG_CONFIG()])
196 #----------------------------------------
197 # Check headers and libs for gconf
198 [need_gtk="$enable_gconf"]
201 [test "$need_gtk" = "yes" -o "$need_gtk" = "auto"],
204 [gtk+-2.0 gmodule-2.0 libglade-2.0],
207 [test "$need_gtk" = "yes"],
208 [AC_MSG_ERROR([could not find GTK+ headers and/or libraries (frontend: gconf)])],
212 [test "$has_gtk" = "no" ],
215 #----------------------------------------
216 # Check headers and libs for gconf
217 [need_qt="$enable_qconf"]
220 [test "$need_qt" = "yes" -o "$need_qt" = "auto"],
223 [QtCore QtGui Qt3Support],
226 [test "$need_qt" = "yes"],
227 [AC_MSG_ERROR([could not find QT4 headers and/or libraries (frontend: qconf)])],
231 [test "$has_qt" = "no" ],
234 #---------------------------------------------------------------------------
235 # Now, we know what frontends to enable
236 AS_IF([test "$enable_conf" = "auto"], [enable_conf=yes ])
237 AS_IF([test "$enable_gconf" = "auto"], [enable_gconf=yes])
238 AS_IF([test "$enable_mconf" = "auto"], [enable_mconf=yes])
239 AS_IF([test "$enable_nconf" = "auto"], [enable_nconf=yes])
240 AS_IF([test "$enable_qconf" = "auto"], [enable_qconf=yes])
242 #---------------------------------------------------------------------------
248 [test "$enable_conf" = "yes"])
251 [test "$enable_mconf" = "yes"])
254 [test "$enable_nconf" = "yes"])
257 [test "$enable_gconf" = "yes"])
260 [test "$enable_qconf" = "yes"])
263 [test "$need_lxdialog" = "yes"])
265 #---------------------------------------------------------------------------
267 LT_INIT([disable-static])
269 #----------------------------------------
270 # Get the version to apply to the parser shared library
272 [KCONFIGPARSER_LIB_VERSION],
273 [m4_esyscmd_s([./scripts/version.sh --plain])])
275 #----------------------------------------
280 libs/lxdialog/Makefile
283 frontends/conf/Makefile
284 frontends/mconf/Makefile
285 frontends/nconf/Makefile
286 frontends/gconf/Makefile
287 frontends/qconf/Makefile
291 AC_MSG_NOTICE([Configured with:])
292 AS_IF([test "$enable_conf" = "yes"],
293 [AC_MSG_NOTICE([ - conf: yes])],
294 [AC_MSG_NOTICE([ - conf: no])])
295 AS_IF([test "$enable_gconf" = "yes"],
296 [AC_MSG_NOTICE([ - gconf: yes])],
297 [AC_MSG_NOTICE([ - gconf: no])])
298 AS_IF([test "$enable_mconf" = "yes"],
299 [AC_MSG_NOTICE([ - mconf: yes])],
300 [AC_MSG_NOTICE([ - mconf: no])])
301 AS_IF([test "$enable_nconf" = "yes"],
302 [AC_MSG_NOTICE([ - nconf: yes])],
303 [AC_MSG_NOTICE([ - nconf: no])])
304 AS_IF([test "$enable_qconf" = "yes"],
305 [AC_MSG_NOTICE([ - qconf: yes])],
306 [AC_MSG_NOTICE([ - qconf: no])])
307 AS_IF([test "$enable_shared" = "yes"],
308 [AC_MSG_NOTICE([ - parser shared library: yes, $KCONFIGPARSER_LIB_VERSION])],
309 [AC_MSG_NOTICE([ - parser shared library: no])])
310 AS_IF([test "$enable_static" = "yes"],
311 [AC_MSG_NOTICE([ - parser static library: yes])],
312 [AC_MSG_NOTICE([ - parser static library: no])])