1 dnl $Id: configure.in,v 1.57 2010/04/28 20:33:01 tom Exp $
2 dnl Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.13.20020210)
6 AC_CONFIG_HEADER(dlg_config.h:config.hin)
8 CF_VERSION_INFO(dialog)
15 dnl Checks for programs.
19 AC_PROG_GCC_TRADITIONAL
24 dnl needed for CF_WITH_LIBTOOL
25 AC_CHECK_TOOL(AR, ar, ar)
42 dnl Checks for libraries.
45 CF_BUNDLED_INTL(makefile,enable)
50 CF_ARG_MSG_ENABLE([if you want --trace option],
52 [ --disable-trace do not support --trace option],
53 [EXTRAOBJS="$EXTRAOBJS trace\$o"
54 AC_DEFINE(HAVE_DLG_TRACE)],,yes)
58 if test "$with_libtool" = "yes" ; then
63 AC_SUBST(LIBTOOL_MAKE)
67 [ --with-ncurses compile/link with ncurses library],
68 [use_ncurses=ncurses])
70 [ --with-ncursesw compile/link with wide-char ncurses library],
71 [use_ncurses=ncursesw])
72 if test $use_ncurses != no ; then
74 if test $use_ncurses = ncursesw ; then
77 CF_NCURSES_CONFIG($use_ncurses)
84 CF_ARG_MSG_ENABLE([if you want extra dialogs],
86 [ --disable-extras do not include extra dialogs],
87 [cf_all_widgets=yes],[cf_all_widgets=no],yes)
89 CF_ARG_MSG_ENABLE([if you want config-file support],
91 [ --disable-rc-file do not include config-file support],
92 [EXTRAOBJS="$EXTRAOBJS rc\$o"
93 AC_DEFINE(HAVE_RC_FILE)],,$cf_all_widgets)
95 CF_ARG_MSG_ENABLE([if you want Xdialog-style dialogs],
97 [ --disable-Xdialog do not include Xdialog-style dialogs],
98 [EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
99 AC_DEFINE(HAVE_XDIALOG)],,$cf_all_widgets)
101 CF_ARG_MSG_ENABLE([if you want the form dialog],
103 [ --disable-form do not include the form dialog],
104 [EXTRAOBJS="$EXTRAOBJS formbox\$o"
105 AC_DEFINE(HAVE_DLG_FORMBOX)],,$cf_all_widgets)
107 CF_ARG_MSG_ENABLE([if you want the gauge dialog],
109 [ --disable-gauge do not include the gauge dialogs],
110 [EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o progressbox\$o"
111 AC_DEFINE(HAVE_DLG_GAUGE)],,$cf_all_widgets)
113 CF_ARG_MSG_ENABLE([if you want the tailbox dialog],
115 [ --disable-tailbox do not include the tailbox dialog],
116 [EXTRAOBJS="$EXTRAOBJS tailbox\$o"
117 AC_DEFINE(HAVE_DLG_TAILBOX)],,$cf_all_widgets)
119 CF_ARG_MSG_ENABLE([if you want the mixedform dialog],
121 [ --disable-mixedform do not include the mixedform dialog],
122 [EXTRAOBJS="$EXTRAOBJS mixedform\$o"
123 AC_DEFINE(HAVE_DLG_MIXEDFORM)],,$cf_all_widgets)
125 CF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
127 [ --disable-mixedgauge do not include the mixedgauge dialog],
128 [EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
129 AC_DEFINE(HAVE_MIXEDGAUGE)],,$cf_all_widgets)
131 CF_ARG_MSG_ENABLE([if you want the wide-curses features],
133 [ --enable-widec enable wide-curses features],
134 [AC_DEFINE(USE_WIDE_CURSES)],,$cf_wide_curses)
139 dnl Checks for header files.
144 AC_CHECK_HEADERS(search.h unctrl.h unistd.h)
148 dnl Checks for library functions.
176 AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR)])
181 CF_HEADERS_SH(DLG,dlg_config.h)
183 AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE)])
185 CF_DISABLE_RPATH_HACK
187 AC_OUTPUT(dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE samples/install/makefile,,,sort -u)