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 #----------------------------------------
89 [AC_MSG_ERROR([can not find gperf])])
90 AC_SUBST([AM_LFLAGS], ["-L -P zconf"])
91 AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"])
93 #----------------------------------------
94 # Check for gettext, for the kconfig frontends
98 [ac_ct_gettext_hdr=$ac_header; break],
99 [AC_MSG_WARN([libintl is missing, frontends will not be localised])])
101 [test -n "$ac_ct_gettext_hdr"],
104 [AC_MSG_WARN([gettext is missing, frontends will not be localised])
105 GETTEXT=-DKBUILD_NO_NLS],
106 [#include <$ac_ct_gettext_hdr>])])
108 #----------------------------------------
109 # Check for ncurses, for the mconf & nconf frontends
111 ["$enable_mconf":"$enable_nconf"],
112 [yes:*], [need_curses=yes],
113 [*:yes], [need_curses=yes],
114 [auto:*], [need_curses=auto],
115 [*:auto], [need_curses=auto],
119 [test "$need_curses" = "yes" -o "$need_curses" = "auto"],
120 [AC_SUBST([CURSES_LOC])
122 [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
123 [CURSES_LOC=$ac_header; break])
125 [test -z "$CURSES_LOC"],
127 [test "$need_curses" = "yes"],
128 [AC_MSG_ERROR([could not find curses headers (frontends: mconf/nconf)])],
132 [ncursesw ncurses curses],
133 [ac_ct_curses_lib_found=yes; break])
135 [test -z "$ac_ct_curses_lib_found"],
137 [test "$need_curses" = "yes"],
138 [AC_MSG_ERROR([could not find curses library (frontends: mconf/nconf)])],
142 [test "$has_curses" = "no" ],
143 [enable_mconf=no; enable_nconf=no])
145 #----------------------------------------
146 # Check for libpanel and libmenu, for the nconf frontend
147 [need_panel_menu="$enable_nconf"]
150 [test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"],
154 [ac_ct_panel_lib_found=yes; break])
156 [test -z "$ac_ct_panel_lib_found"],
158 [test "$need_panel_menu" = "yes"],
159 [AC_MSG_ERROR([could not find libpanel library (frontend: nconf)])],
160 [has_panel_menu=no])])
164 [ac_ct_menu_lib_found=yes; break])
166 [test -z "$ac_ct_panel_lib_found"],
168 [test "$need_panel_menu" = "yes"],
169 [AC_MSG_ERROR([could not find libmenu library (frontend: nconf)])],
170 [has_panel_menu=no])])])
173 [test "$has_panel_menu" = "no" ],
176 #----------------------------------------
177 # Check if the lxdialog library should be built
179 [test "$enable_mconf" = "yes" -o "$enable_mconf" = "auto"],
183 #----------------------------------------
184 # Check pkg-config if needed
186 ["$enable_gconf":"$enable_qconf"],
187 [yes:*], [need_pkgconfig=yes],
188 [*:yes], [need_pkgconfig=yes],
189 [auto:*], [need_pkgconfig=yes],
190 [*:auto], [need_pkgconfig=yes],
191 [need_pkgconfig=no ])
194 [test "$need_pkgconfig" = "yes"],
195 [PKG_PROG_PKG_CONFIG()])
197 #----------------------------------------
198 # Check headers and libs for gconf
199 [need_gtk="$enable_gconf"]
202 [test "$need_gtk" = "yes" -o "$need_gtk" = "auto"],
205 [gtk+-2.0 gmodule-2.0 libglade-2.0],
208 [test "$need_gtk" = "yes"],
209 [AC_MSG_ERROR([could not find GTK+ headers and/or libraries (frontend: gconf)])],
213 [test "$has_gtk" = "no" ],
216 #----------------------------------------
217 # Check headers and libs for gconf
218 [need_qt="$enable_qconf"]
221 [test "$need_qt" = "yes" -o "$need_qt" = "auto"],
224 [QtCore QtGui Qt3Support],
227 [test "$need_qt" = "yes"],
228 [AC_MSG_ERROR([could not find QT4 headers and/or libraries (frontend: qconf)])],
232 [test "$has_qt" = "no" ],
235 #---------------------------------------------------------------------------
236 # Now, we know what frontends to enable
237 AS_IF([test "$enable_conf" = "auto"], [enable_conf=yes ])
238 AS_IF([test "$enable_gconf" = "auto"], [enable_gconf=yes])
239 AS_IF([test "$enable_mconf" = "auto"], [enable_mconf=yes])
240 AS_IF([test "$enable_nconf" = "auto"], [enable_nconf=yes])
241 AS_IF([test "$enable_qconf" = "auto"], [enable_qconf=yes])
243 #---------------------------------------------------------------------------
249 [test "$enable_conf" = "yes"])
252 [test "$enable_mconf" = "yes"])
255 [test "$enable_nconf" = "yes"])
258 [test "$enable_gconf" = "yes"])
261 [test "$enable_qconf" = "yes"])
264 [test "$need_lxdialog" = "yes"])
266 #----------------------------------------
271 libs/lxdialog/Makefile
274 frontends/conf/Makefile
275 frontends/mconf/Makefile
276 frontends/nconf/Makefile
277 frontends/gconf/Makefile
278 frontends/qconf/Makefile
282 AC_MSG_NOTICE([Configured with:])
283 AS_IF([test "$enable_conf" = "yes"],
284 [AC_MSG_NOTICE([ - conf: yes])],
285 [AC_MSG_NOTICE([ - conf: no])])
286 AS_IF([test "$enable_gconf" = "yes"],
287 [AC_MSG_NOTICE([ - gconf: yes])],
288 [AC_MSG_NOTICE([ - gconf: no])])
289 AS_IF([test "$enable_mconf" = "yes"],
290 [AC_MSG_NOTICE([ - mconf: yes])],
291 [AC_MSG_NOTICE([ - mconf: no])])
292 AS_IF([test "$enable_nconf" = "yes"],
293 [AC_MSG_NOTICE([ - nconf: yes])],
294 [AC_MSG_NOTICE([ - nconf: no])])
295 AS_IF([test "$enable_qconf" = "yes"],
296 [AC_MSG_NOTICE([ - qconf: yes])],
297 [AC_MSG_NOTICE([ - qconf: no])])