1 dnl $Id: configure.in,v 1.101 2020/11/26 16:21:27 tom Exp $
2 dnl Process this file with autoconf to produce a configure script.
3 dnl ---------------------------------------------------------------------------
4 dnl Copyright 1999-2019,2020 -- 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.52.20200802)
32 AC_CONFIG_HEADER(dlg_config.h:config.hin)
40 dnl Checks for programs.
51 test -z "$GROFF_NOTE" && NROFF_NOTE=
53 dnl needed for CF_WITH_LIBTOOL
65 CF_WITH_INSTALL_PREFIX
66 CF_WITH_SCREEN_PDCURSES
67 CF_ENABLE_WARNINGS(,yes)
71 dnl Allow dialog program and library to be renamed.
72 AC_MSG_CHECKING(for this package's name)
74 [ --with-package=XXX rename dialog to XXX, library to libXXX.a, etc],
77 AC_MSG_RESULT($PACKAGE)
78 CF_VERSION_INFO(dialog,$PACKAGE)
84 AC_SUBST(CFG_ROOTNAME)
85 AC_SUBST(HDR_ROOTNAME)
86 AC_SUBST(LIB_ROOTNAME)
89 dnl If package is renamed, it is useful to have the dlg_XXX headers in a
90 dnl subdirectory (using the package name) so that multiple versions of the
91 dnl headers can coexist.
92 AC_MSG_CHECKING(if we should install dlg_XXX headers to subdirectory)
93 AC_ARG_ENABLE(header-subdir,
94 [ --enable-header-subdir install dlg_XXX headers to subdirectory],
97 AC_MSG_RESULT($SUB_INC)
103 dnl Checks for libraries.
106 CF_BUNDLED_INTL(makefile,enable)
107 CF_MATH_LIB(,sqrt(x))
111 CF_ARG_MSG_ENABLE([if you want --trace option],
113 [ --disable-trace do not support --trace option],
114 [EXTRAOBJS="$EXTRAOBJS trace\$o"
115 AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
119 CF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`)
127 CF_ARG_MSG_ENABLE([if you want extra dialogs],
129 [ --disable-extras do not include extra dialogs],
130 [cf_all_widgets=yes],[cf_all_widgets=no],yes)
133 CF_ARG_MSG_ENABLE([if you want config-file support],
135 [ --disable-rc-file do not include config-file support],
136 [EXTRAOBJS="$EXTRAOBJS rc\$o"
137 AC_DEFINE(HAVE_RC_FILE,1,[Define to 1 to include config-file support])],cf_use_dialogrc=no,$cf_all_widgets)
140 if test "$cf_use_dialogrc" = yes; then
141 CF_ARG_MSG_ENABLE([if you want extra attributes in config-file],
143 [ --disable-rc-file2 do not use extra attributes in config-file],
144 [AC_DEFINE(HAVE_RC_FILE2,1,[Define to 1 to use extra attributes in config-file])],cf_use_dialogrc2=no,$cf_all_widgets)
147 CF_ARG_MSG_ENABLE([if you want Xdialog-style dialogs],
149 [ --disable-Xdialog do not include Xdialog-style dialogs (1.1)],
150 [EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
151 AC_DEFINE(HAVE_XDIALOG,1,[Define to 1 to include Xdialog-style dialogs])],,$cf_all_widgets)
153 CF_ARG_MSG_ENABLE([if you want extra Xdialog-style dialogs (1.2)],
155 [ --disable-Xdialog2 do not include extra Xdialog-style dialogs (1.2)],
156 [EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
157 AC_DEFINE(HAVE_XDIALOG2,1,[Define to 1 to include extra Xdialog-style dialogs])],,$cf_all_widgets)
159 CF_ARG_MSG_ENABLE([if you want compatibility with whiptail options],
161 [ --disable-whiptail do not map extra whiptail options],
162 [AC_DEFINE(HAVE_WHIPTAIL,1,[Define to 1 to include extra whiptail options])],,$cf_all_widgets)
164 CF_ARG_MSG_ENABLE([if you want the form dialog],
166 [ --disable-form do not include the form dialog],
167 [EXTRAOBJS="$EXTRAOBJS formbox\$o"
168 AC_DEFINE(HAVE_DLG_FORMBOX,1,[Define to 1 to include the form dialog])],,$cf_all_widgets)
170 CF_ARG_MSG_ENABLE([if you want the gauge dialog],
172 [ --disable-gauge do not include the gauge dialogs],
173 [EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
174 AC_DEFINE(HAVE_DLG_GAUGE,1,[Define to 1 to include the gauge dialogs])],,$cf_all_widgets)
176 CF_ARG_MSG_ENABLE([if you want the tailbox dialog],
178 [ --disable-tailbox do not include the tailbox dialog],
179 [EXTRAOBJS="$EXTRAOBJS tailbox\$o"
180 AC_DEFINE(HAVE_DLG_TAILBOX,1,[Define to 1 to include the tailbox dialog])],,$cf_all_widgets)
182 CF_ARG_MSG_ENABLE([if you want the mixedform dialog],
184 [ --disable-mixedform do not include the mixedform dialog],
185 [EXTRAOBJS="$EXTRAOBJS mixedform\$o"
186 AC_DEFINE(HAVE_DLG_MIXEDFORM,1,[Define to 1 to include the mixedform dialog])],,${enable_form:=$cf_all_widgets})
188 CF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
190 [ --disable-mixedgauge do not include the mixedgauge dialog],
191 [EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
192 AC_DEFINE(HAVE_MIXEDGAUGE,1,[Define to 1 to include the mixedgauge dialog])],,$cf_all_widgets)
194 CF_ARG_MSG_ENABLE([if you want the wide-curses features],
196 [ --enable-widec enable wide-curses features],
197 [AC_DEFINE(USE_WIDE_CURSES,1,[Define to 1 to enable wide-curses features])],,$cf_cv_widec_curses)
202 dnl Checks for header files.
207 AC_CHECK_HEADERS(search.h stdint.h sys/param.h unistd.h)
211 dnl Checks for library functions.
254 AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR,1,[Define to 1 if (n)curses has start_color function])])
256 CF_CURSES_WACS_SYMBOLS
262 CF_HEADERS_SH(DLG,dlg_config.h)
264 AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])])
265 CF_NL_LANGINFO_1STDAY
267 CF_MERGE_EXTRA_CFLAGS
268 CF_DISABLE_RPATH_HACK
270 CF__DEFINE_SHLIB_VARS
282 [\${LIBS} \${LDFLAGS}])