1 dnl $Id: configure.in,v 1.68 2011/10/20 21:02:43 tom Exp $
2 dnl Process this file with autoconf to produce a configure script.
3 dnl ---------------------------------------------------------------------------
4 dnl Copyright 1999-2010,2011 -- Thomas E. Dickey
6 dnl Permission is hereby granted, free of charge, to any person obtaining a
7 dnl copy of this software and associated documentation files (the
8 dnl "Software"), to deal in the Software without restriction, including
9 dnl without limitation the rights to use, copy, modify, merge, publish,
10 dnl distribute, distribute with modifications, sublicense, and/or sell
11 dnl copies of the Software, and to permit persons to whom the Software is
12 dnl furnished to do so, subject to the following conditions:
14 dnl The above copyright notice and this permission notice shall be included
15 dnl in all copies or portions of the Software.
17 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21 dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22 dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
23 dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 dnl Except as contained in this notice, the name(s) of the above copyright
26 dnl holders shall not be used in advertising or otherwise to promote the
27 dnl sale, use or other dealings in this Software without prior written
29 dnl ---------------------------------------------------------------------------
30 AC_PREREQ(2.13.20020210)
32 AC_CONFIG_HEADER(dlg_config.h:config.hin)
40 dnl Checks for programs.
44 AC_PROG_GCC_TRADITIONAL
50 dnl needed for CF_WITH_LIBTOOL
51 AC_CHECK_TOOL(AR, ar, ar)
68 dnl Allow dialog program and library to be renamed.
70 [ --with-package=XXX rename dialog to XXX, library to libXXX.a, etc],
73 CF_VERSION_INFO(dialog,$PACKAGE)
76 dnl If package is renamed, it is useful to have the dlg_XXX headers in a
77 dnl subdirectory (using the package name) so that multiple versions of the
78 dnl headers can coexist.
79 AC_ARG_ENABLE(header-subdir,
80 [ --enable-header-subdir install dlg_XXX headers to subdirectory],
86 dnl Checks for libraries.
89 CF_BUNDLED_INTL(makefile,enable)
94 CF_ARG_MSG_ENABLE([if you want --trace option],
96 [ --disable-trace do not support --trace option],
97 [EXTRAOBJS="$EXTRAOBJS trace\$o"
98 AC_DEFINE(HAVE_DLG_TRACE)],,yes)
102 if test "$with_libtool" = "yes" ; then
107 AC_SUBST(LIBTOOL_MAKE)
113 [ --with-ncurses compile/link with ncurses library],
114 [use_ncurses=ncurses])
115 AC_ARG_WITH(ncursesw,
116 [ --with-ncursesw compile/link with wide-char ncurses library],
117 [use_ncurses=ncursesw])
118 if test $use_ncurses != no ; then
120 if test $use_ncurses = ncursesw ; then
123 CF_NCURSES_CONFIG($use_ncurses)
130 CF_ARG_MSG_ENABLE([if you want extra dialogs],
132 [ --disable-extras do not include extra dialogs],
133 [cf_all_widgets=yes],[cf_all_widgets=no],yes)
135 CF_ARG_MSG_ENABLE([if you want config-file support],
137 [ --disable-rc-file do not include config-file support],
138 [EXTRAOBJS="$EXTRAOBJS rc\$o"
139 AC_DEFINE(HAVE_RC_FILE)],,$cf_all_widgets)
141 CF_ARG_MSG_ENABLE([if you want Xdialog-style dialogs],
143 [ --disable-Xdialog do not include Xdialog-style dialogs],
144 [EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
145 AC_DEFINE(HAVE_XDIALOG)],,$cf_all_widgets)
147 CF_ARG_MSG_ENABLE([if you want the form dialog],
149 [ --disable-form do not include the form dialog],
150 [EXTRAOBJS="$EXTRAOBJS formbox\$o"
151 AC_DEFINE(HAVE_DLG_FORMBOX)],,$cf_all_widgets)
153 CF_ARG_MSG_ENABLE([if you want the gauge dialog],
155 [ --disable-gauge do not include the gauge dialogs],
156 [EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
157 AC_DEFINE(HAVE_DLG_GAUGE)],,$cf_all_widgets)
159 CF_ARG_MSG_ENABLE([if you want the tailbox dialog],
161 [ --disable-tailbox do not include the tailbox dialog],
162 [EXTRAOBJS="$EXTRAOBJS tailbox\$o"
163 AC_DEFINE(HAVE_DLG_TAILBOX)],,$cf_all_widgets)
165 CF_ARG_MSG_ENABLE([if you want the mixedform dialog],
167 [ --disable-mixedform do not include the mixedform dialog],
168 [EXTRAOBJS="$EXTRAOBJS mixedform\$o"
169 AC_DEFINE(HAVE_DLG_MIXEDFORM)],,$cf_all_widgets)
171 CF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
173 [ --disable-mixedgauge do not include the mixedgauge dialog],
174 [EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
175 AC_DEFINE(HAVE_MIXEDGAUGE)],,$cf_all_widgets)
177 CF_ARG_MSG_ENABLE([if you want the wide-curses features],
179 [ --enable-widec enable wide-curses features],
180 [AC_DEFINE(USE_WIDE_CURSES)],,$cf_wide_curses)
185 dnl Checks for header files.
190 AC_CHECK_HEADERS(search.h unctrl.h unistd.h)
194 dnl Checks for library functions.
233 AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR)])
235 CF_CURSES_WACS_SYMBOLS
240 CF_HEADERS_SH(DLG,dlg_config.h)
242 AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE)])
244 CF_DISABLE_RPATH_HACK
246 AC_OUTPUT(dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE samples/install/makefile,,,sort -u)