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=yes)])])
53 AC_SUBST([enable_conf], [${enable_conf:-yes}])
58 [mconf, the traditional ncurses-based frontend (default=yes)])])
59 AC_SUBST([enable_mconf], [${enable_mconf:-yes}])
64 [nconf, the modern ncurses-based frontend (default=yes)])])
65 AC_SUBST([enable_nconf], [${enable_nconf:-yes}])
70 [gconf, the GTK-based frontend (default=yes)])])
71 AC_SUBST([enable_gconf], [${enable_gconf:-yes}])
76 [qconf, the QT-based frontend (default=yes)])])
77 AC_SUBST([enable_qconf], [${enable_qconf:-yes}])
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 kconfig frontends
111 [test "$enable_mconf" = "yes" -o "$enable_nconf" = "yes"],
112 [AC_SUBST([CURSES_LOC])
114 [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
115 [CURSES_LOC=$ac_header; break])
117 [test -z "$CURSES_LOC"],
118 [AC_MSG_ERROR([could not find curses headers])])
121 [ncursesw ncurses curses],
122 [ac_ct_curses_lib_found=yes; break])
124 [test -z "$ac_ct_curses_lib_found"],
125 [AC_MSG_ERROR([could not find curses library])])])
128 [test "$enable_nconf" = "yes"],
132 [ac_ct_panel_lib_found=yes; break])
134 [test -z "$ac_ct_panel_lib_found"],
135 [AC_MSG_ERROR([could not find libpanel library])])
139 [ac_ct_menu_lib_found=yes; break])
141 [test -z "$ac_ct_panel_lib_found"],
142 [AC_MSG_ERROR([could not find libmenu library])])])
144 #----------------------------------------
145 # Check if the lxdialog library should be built
147 [test "$enable_mconf" = "yes"],
151 #----------------------------------------
152 # Check pkg-config if needed
154 [test "$enable_gconf" = "yes" \
155 -o "$enable_qconf" = "yes"],
156 [PKG_PROG_PKG_CONFIG()])
158 #----------------------------------------
159 # Check headers and libs for gconf
161 [test "$enable_gconf" = yes ],
164 [gtk+-2.0 gmodule-2.0 libglade-2.0])])
166 #----------------------------------------
167 # Check headers and libs for gconf
169 [test "$enable_qconf" = "yes"],
172 [QtCore QtGui Qt3Support])])
174 #---------------------------------------------------------------------------
180 [test "$enable_conf" = "yes"])
183 [test "$enable_mconf" = "yes"])
186 [test "$enable_nconf" = "yes"])
189 [test "$enable_gconf" = "yes"])
192 [test "$enable_qconf" = "yes"])
195 [test "$need_lxdialog" = "yes"])
197 #----------------------------------------
202 libs/lxdialog/Makefile
205 frontends/conf/Makefile
206 frontends/mconf/Makefile
207 frontends/nconf/Makefile
208 frontends/gconf/Makefile
209 frontends/qconf/Makefile
213 AC_MSG_NOTICE([Configured with:])
214 AS_IF([test "$enable_conf" = "yes"],
215 [AC_MSG_NOTICE([ - conf: yes])],
216 [AC_MSG_NOTICE([ - conf: no])])
217 AS_IF([test "$enable_gconf" = "yes"],
218 [AC_MSG_NOTICE([ - gconf: yes])],
219 [AC_MSG_NOTICE([ - gconf: no])])
220 AS_IF([test "$enable_mconf" = "yes"],
221 [AC_MSG_NOTICE([ - mconf: yes])],
222 [AC_MSG_NOTICE([ - mconf: no])])
223 AS_IF([test "$enable_nconf" = "yes"],
224 [AC_MSG_NOTICE([ - nconf: yes])],
225 [AC_MSG_NOTICE([ - nconf: no])])
226 AS_IF([test "$enable_qconf" = "yes"],
227 [AC_MSG_NOTICE([ - qconf: yes])],
228 [AC_MSG_NOTICE([ - qconf: no])])