xref: /freebsd/contrib/dialog/configure.in (revision febdb468)
1febdb468SDevin Teskednl $Id: configure.in,v 1.101 2020/11/26 16:21:27 tom Exp $
24c8945a0SNathan Whitehorndnl Process this file with autoconf to produce a configure script.
37a1c0d96SNathan Whitehorndnl ---------------------------------------------------------------------------
42a3e3873SBaptiste Daroussindnl Copyright 1999-2019,2020 -- Thomas E. Dickey
54c8945a0SNathan Whitehorndnl
67a1c0d96SNathan Whitehorndnl Permission is hereby granted, free of charge, to any person obtaining a
77a1c0d96SNathan Whitehorndnl copy of this software and associated documentation files (the
87a1c0d96SNathan Whitehorndnl "Software"), to deal in the Software without restriction, including
97a1c0d96SNathan Whitehorndnl without limitation the rights to use, copy, modify, merge, publish,
107a1c0d96SNathan Whitehorndnl distribute, distribute with modifications, sublicense, and/or sell
117a1c0d96SNathan Whitehorndnl copies of the Software, and to permit persons to whom the Software is
127a1c0d96SNathan Whitehorndnl furnished to do so, subject to the following conditions:
137a1c0d96SNathan Whitehorndnl
147a1c0d96SNathan Whitehorndnl The above copyright notice and this permission notice shall be included
157a1c0d96SNathan Whitehorndnl in all copies or portions of the Software.
167a1c0d96SNathan Whitehorndnl
177a1c0d96SNathan Whitehorndnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
187a1c0d96SNathan Whitehorndnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
197a1c0d96SNathan Whitehorndnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
207a1c0d96SNathan Whitehorndnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
217a1c0d96SNathan Whitehorndnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
227a1c0d96SNathan Whitehorndnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
237a1c0d96SNathan Whitehorndnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.
247a1c0d96SNathan Whitehorndnl
257a1c0d96SNathan Whitehorndnl Except as contained in this notice, the name(s) of the above copyright
267a1c0d96SNathan Whitehorndnl holders shall not be used in advertising or otherwise to promote the
277a1c0d96SNathan Whitehorndnl sale, use or other dealings in this Software without prior written
287a1c0d96SNathan Whitehorndnl authorization.
297a1c0d96SNathan Whitehorndnl ---------------------------------------------------------------------------
302a3e3873SBaptiste DaroussinAC_PREREQ(2.52.20200802)
314c8945a0SNathan WhitehornAC_INIT(dialog.h)
324c8945a0SNathan WhitehornAC_CONFIG_HEADER(dlg_config.h:config.hin)
334c8945a0SNathan Whitehorn
344c8945a0SNathan WhitehornAC_ARG_PROGRAM
354c8945a0SNathan Whitehorn
364c8945a0SNathan WhitehornDESTDIR=
374c8945a0SNathan WhitehornAC_SUBST(DESTDIR)
384c8945a0SNathan Whitehorn
394c8945a0SNathan Whitehorndnl
404c8945a0SNathan Whitehorndnl Checks for programs.
414c8945a0SNathan Whitehorndnl
422a3e3873SBaptiste DaroussinCF_PROG_CC
434c8945a0SNathan WhitehornAC_PROG_CPP
444c8945a0SNathan WhitehornAC_PROG_MAKE_SET
454c8945a0SNathan WhitehornAC_PROG_RANLIB
464c8945a0SNathan WhitehornAC_PROG_INSTALL
47febdb468SDevin TeskeCF_PROG_LN_S
482a3e3873SBaptiste DaroussinCF_PROG_LINT
494c8945a0SNathan Whitehorn
504c8945a0SNathan WhitehornCF_PROG_GROFF
514c8945a0SNathan Whitehorntest -z "$GROFF_NOTE" && NROFF_NOTE=
524c8945a0SNathan Whitehorn
534c8945a0SNathan Whitehorndnl needed for CF_WITH_LIBTOOL
544c8945a0SNathan WhitehornCF_AR_FLAGS
554c8945a0SNathan Whitehorn
564c8945a0SNathan WhitehornCF_MAKEFLAGS
574c8945a0SNathan WhitehornCF_MAKE_TAGS
584c8945a0SNathan WhitehornCF_DISABLE_ECHO
594c8945a0SNathan WhitehornCF_PROG_EXT
604c8945a0SNathan WhitehornCF_PATHSEP
614c8945a0SNathan WhitehornCF_LIB_PREFIX
624c8945a0SNathan WhitehornCF_XOPEN_SOURCE
63febdb468SDevin TeskeCF_LARGEFILE
644c8945a0SNathan Whitehorn
654c8945a0SNathan WhitehornCF_WITH_INSTALL_PREFIX
667a1c0d96SNathan WhitehornCF_WITH_SCREEN_PDCURSES
67febdb468SDevin TeskeCF_ENABLE_WARNINGS(,yes)
687a1c0d96SNathan WhitehornCF_PKG_CONFIG
697a1c0d96SNathan Whitehorn
707a1c0d96SNathan Whitehorndnl
717a1c0d96SNathan Whitehorndnl Allow dialog program and library to be renamed.
72febdb468SDevin TeskeAC_MSG_CHECKING(for this package's name)
737a1c0d96SNathan WhitehornAC_ARG_WITH(package,
747a1c0d96SNathan Whitehorn	[  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc],
75febdb468SDevin Teske	[PACKAGE=$withval],
76febdb468SDevin Teske	[PACKAGE=dialog])
77febdb468SDevin TeskeAC_MSG_RESULT($PACKAGE)
78febdb468SDevin TeskeCF_VERSION_INFO(dialog,$PACKAGE)
79febdb468SDevin Teske
80febdb468SDevin TeskeCFG_ROOTNAME=$PACKAGE
81febdb468SDevin TeskeHDR_ROOTNAME=$PACKAGE
82febdb468SDevin TeskeLIB_ROOTNAME=$PACKAGE
837a1c0d96SNathan Whitehorn
847a1c0d96SNathan WhitehornAC_SUBST(CFG_ROOTNAME)
857a1c0d96SNathan WhitehornAC_SUBST(HDR_ROOTNAME)
867a1c0d96SNathan WhitehornAC_SUBST(LIB_ROOTNAME)
87febdb468SDevin Teske
887a1c0d96SNathan Whitehorndnl
897a1c0d96SNathan Whitehorndnl If package is renamed, it is useful to have the dlg_XXX headers in a
907a1c0d96SNathan Whitehorndnl subdirectory (using the package name) so that multiple versions of the
917a1c0d96SNathan Whitehorndnl headers can coexist.
92febdb468SDevin TeskeAC_MSG_CHECKING(if we should install dlg_XXX headers to subdirectory)
937a1c0d96SNathan WhitehornAC_ARG_ENABLE(header-subdir,
947a1c0d96SNathan Whitehorn	[  --enable-header-subdir  install dlg_XXX headers to subdirectory],
957a1c0d96SNathan Whitehorn	[SUB_INC=$enableval],
964c8945a0SNathan Whitehorn	[SUB_INC=no])
974c8945a0SNathan WhitehornAC_MSG_RESULT($SUB_INC)
984c8945a0SNathan WhitehornAC_SUBST(SUB_INC)
994c8945a0SNathan Whitehorn
1004c8945a0SNathan WhitehornCF_WITH_MAN2HTML
1014c8945a0SNathan Whitehorn
1024c8945a0SNathan Whitehorndnl
1034c8945a0SNathan Whitehorndnl Checks for libraries.
1044c8945a0SNathan Whitehorndnl
1054c8945a0SNathan WhitehornEXTRAOBJS=""
1064c8945a0SNathan WhitehornCF_BUNDLED_INTL(makefile,enable)
1074c8945a0SNathan WhitehornCF_MATH_LIB(,sqrt(x))
1082a3e3873SBaptiste Daroussin
1094c8945a0SNathan WhitehornCF_WITH_NO_LEAKS
110febdb468SDevin Teske
111febdb468SDevin TeskeCF_ARG_MSG_ENABLE([if you want --trace option],
1124c8945a0SNathan Whitehorn	trace,
1137a1c0d96SNathan Whitehorn	[  --disable-trace         do not support --trace option],
1147a1c0d96SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS trace\$o"
115febdb468SDevin Teske	 AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
116febdb468SDevin Teske
1174c8945a0SNathan WhitehornCF_ENABLE_RPATH
1184c8945a0SNathan WhitehornCF_LD_RPATH_OPT
1194c8945a0SNathan WhitehornCF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`)
1204c8945a0SNathan Whitehorn
1214c8945a0SNathan WhitehornCF_WITH_CURSES_DIR
1224c8945a0SNathan Whitehorn
1234c8945a0SNathan WhitehornCF_WITH_NCURSES_ETC
1244c8945a0SNathan WhitehornCF_WIDEC_CURSES
1254c8945a0SNathan Whitehorn
1264c8945a0SNathan Whitehorncf_all_widgets=yes
1274c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want extra dialogs],
1284c8945a0SNathan Whitehorn	extras,
1294c8945a0SNathan Whitehorn	[  --disable-extras        do not include extra dialogs],
1304c8945a0SNathan Whitehorn	[cf_all_widgets=yes],[cf_all_widgets=no],yes)
1314c8945a0SNathan Whitehorn
1324c8945a0SNathan Whitehorncf_use_dialogrc=yes
1334c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want config-file support],
1344c8945a0SNathan Whitehorn	rc-file,
1354c8945a0SNathan Whitehorn	[  --disable-rc-file       do not include config-file support],
1364c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS rc\$o"
1374c8945a0SNathan Whitehorn	 AC_DEFINE(HAVE_RC_FILE,1,[Define to 1 to include config-file support])],cf_use_dialogrc=no,$cf_all_widgets)
1384c8945a0SNathan Whitehorn
1394c8945a0SNathan Whitehorncf_use_dialogrc2=yes
1404c8945a0SNathan Whitehornif test "$cf_use_dialogrc" = yes; then
1414c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want extra attributes in config-file],
1424c8945a0SNathan Whitehorn	rc-file2,
1434c8945a0SNathan Whitehorn	[  --disable-rc-file2      do not use extra attributes in config-file],
1444c8945a0SNathan Whitehorn	[AC_DEFINE(HAVE_RC_FILE2,1,[Define to 1 to use extra attributes in config-file])],cf_use_dialogrc2=no,$cf_all_widgets)
1452a3e3873SBaptiste Daroussinfi
1464c8945a0SNathan Whitehorn
1474c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want Xdialog-style dialogs],
1484c8945a0SNathan Whitehorn	Xdialog,
1492a3e3873SBaptiste Daroussin	[  --disable-Xdialog       do not include Xdialog-style dialogs (1.1)],
1504c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
1512a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_XDIALOG,1,[Define to 1 to include Xdialog-style dialogs])],,$cf_all_widgets)
1522a3e3873SBaptiste Daroussin
1532a3e3873SBaptiste DaroussinCF_ARG_MSG_ENABLE([if you want extra Xdialog-style dialogs (1.2)],
1542a3e3873SBaptiste Daroussin	Xdialog2,
1552a3e3873SBaptiste Daroussin	[  --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)],
1562a3e3873SBaptiste Daroussin	[EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
1572a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_XDIALOG2,1,[Define to 1 to include extra Xdialog-style dialogs])],,$cf_all_widgets)
1582a3e3873SBaptiste Daroussin
1592a3e3873SBaptiste DaroussinCF_ARG_MSG_ENABLE([if you want compatibility with whiptail options],
1602a3e3873SBaptiste Daroussin	whiptail,
1612a3e3873SBaptiste Daroussin	[  --disable-whiptail      do not map extra whiptail options],
1622a3e3873SBaptiste Daroussin	[AC_DEFINE(HAVE_WHIPTAIL,1,[Define to 1 to include extra whiptail options])],,$cf_all_widgets)
1634c8945a0SNathan Whitehorn
1644c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the form dialog],
1654c8945a0SNathan Whitehorn	form,
1664c8945a0SNathan Whitehorn	[  --disable-form          do not include the form dialog],
1674c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS formbox\$o"
1682a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_FORMBOX,1,[Define to 1 to include the form dialog])],,$cf_all_widgets)
1694c8945a0SNathan Whitehorn
1704c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the gauge dialog],
1714c8945a0SNathan Whitehorn	gauge,
1724c8945a0SNathan Whitehorn	[  --disable-gauge         do not include the gauge dialogs],
1737a1c0d96SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
1742a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_GAUGE,1,[Define to 1 to include the gauge dialogs])],,$cf_all_widgets)
1754c8945a0SNathan Whitehorn
1764c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the tailbox dialog],
1774c8945a0SNathan Whitehorn	tailbox,
1784c8945a0SNathan Whitehorn	[  --disable-tailbox       do not include the tailbox dialog],
1794c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS tailbox\$o"
1802a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_TAILBOX,1,[Define to 1 to include the tailbox dialog])],,$cf_all_widgets)
1814c8945a0SNathan Whitehorn
1824c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the mixedform dialog],
1834c8945a0SNathan Whitehorn	mixedform,
1844c8945a0SNathan Whitehorn	[  --disable-mixedform     do not include the mixedform dialog],
1854c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS mixedform\$o"
1862a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_MIXEDFORM,1,[Define to 1 to include the mixedform dialog])],,${enable_form:=$cf_all_widgets})
1874c8945a0SNathan Whitehorn
1884c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
1894c8945a0SNathan Whitehorn	mixedgauge,
1904c8945a0SNathan Whitehorn	[  --disable-mixedgauge    do not include the mixedgauge dialog],
1914c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
1922a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_MIXEDGAUGE,1,[Define to 1 to include the mixedgauge dialog])],,$cf_all_widgets)
1934c8945a0SNathan Whitehorn
1944c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the wide-curses features],
1954c8945a0SNathan Whitehorn	widec,
1964c8945a0SNathan Whitehorn	[  --enable-widec          enable wide-curses features],
1972a3e3873SBaptiste Daroussin	[AC_DEFINE(USE_WIDE_CURSES,1,[Define to 1 to enable wide-curses features])],,$cf_cv_widec_curses)
1984c8945a0SNathan Whitehorn
1994c8945a0SNathan WhitehornAC_SUBST(EXTRAOBJS)
2004c8945a0SNathan Whitehorn
2014c8945a0SNathan Whitehorndnl
2024c8945a0SNathan Whitehorndnl Checks for header files.
2034c8945a0SNathan Whitehorndnl
2044c8945a0SNathan WhitehornAC_HEADER_STDC
2054c8945a0SNathan WhitehornAC_HEADER_TIME
2064c8945a0SNathan WhitehornAC_HEADER_DIRENT
2074c8945a0SNathan WhitehornAC_CHECK_HEADERS(search.h stdint.h sys/param.h unistd.h)
2084c8945a0SNathan WhitehornCF_CURSES_TERM_H
2094c8945a0SNathan Whitehorn
2104c8945a0SNathan Whitehorndnl
2114c8945a0SNathan Whitehorndnl Checks for library functions.
2124c8945a0SNathan Whitehorndnl
2134c8945a0SNathan WhitehornAC_TYPE_SIGNAL
2144c8945a0SNathan WhitehornAC_CHECK_FUNCS(\
2154c8945a0SNathan Whitehornbtowc \
2167a1c0d96SNathan Whitehornmblen \
2177a1c0d96SNathan Whitehornmbrlen \
2187a1c0d96SNathan Whitehornmbrtowc \
2197a1c0d96SNathan Whitehornmbtowc \
2207a1c0d96SNathan Whitehornstrcasecmp \
2214c8945a0SNathan Whitehornstrftime \
2224c8945a0SNathan Whitehorntsearch \
2234c8945a0SNathan Whitehornwaitpid \
2244c8945a0SNathan Whitehornwcsrtombs \
2257a1c0d96SNathan Whitehornwcstombs \
2267a1c0d96SNathan Whitehornwctob \
2277a1c0d96SNathan Whitehornwctomb \
2287a1c0d96SNathan Whitehornmktime \
2294c8945a0SNathan Whitehorn)
2304c8945a0SNathan Whitehorn
2314c8945a0SNathan WhitehornCF_CURSES_FUNCS(\
2324c8945a0SNathan Whitehornflushinp \
2337a1c0d96SNathan Whitehorngetattrs \
2344c8945a0SNathan Whitehorngetbegx \
2354c8945a0SNathan Whitehorngetbegy \
2364c8945a0SNathan Whitehorngetbegyx \
2374c8945a0SNathan Whitehorngetcurx \
2384c8945a0SNathan Whitehorngetcury \
2394c8945a0SNathan Whitehorngetmaxx \
2404c8945a0SNathan Whitehorngetmaxy \
2414c8945a0SNathan Whitehorngetmaxyx \
2424c8945a0SNathan Whitehorngetparx \
2434c8945a0SNathan Whitehorngetpary \
2444c8945a0SNathan Whitehorngetparyx \
2454c8945a0SNathan Whitehornuse_default_colors \
246682c9e0fSNathan Whitehornwchgat \
2472a3e3873SBaptiste Daroussinwcursyncup \
2484c8945a0SNathan Whitehornwget_wch \
2492a3e3873SBaptiste Daroussinwsyncup \
2504c8945a0SNathan Whitehorn)
2514c8945a0SNathan Whitehorn
2522a3e3873SBaptiste DaroussinCF_CURSES_EXIT
2534c8945a0SNathan Whitehorn
2547a1c0d96SNathan WhitehornAC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR,1,[Define to 1 if (n)curses has start_color function])])
2552a3e3873SBaptiste DaroussinCF_CURSES_CHTYPE
2564c8945a0SNathan WhitehornCF_CURSES_WACS_SYMBOLS
2574c8945a0SNathan WhitehornCF_CURSES_WGETPARENT
2584c8945a0SNathan WhitehornCF_FUNC_WAIT
2594c8945a0SNathan WhitehornCF_MBSTATE_T
2604c8945a0SNathan WhitehornCF_SIZECHANGE
2612a3e3873SBaptiste Daroussin
2624c8945a0SNathan WhitehornCF_HEADERS_SH(DLG,dlg_config.h)
2634c8945a0SNathan Whitehorn
2644c8945a0SNathan WhitehornAC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])])
265febdb468SDevin TeskeCF_NL_LANGINFO_1STDAY
266febdb468SDevin Teske
267febdb468SDevin TeskeCF_MERGE_EXTRA_CFLAGS
268febdb468SDevin TeskeCF_DISABLE_RPATH_HACK
269febdb468SDevin Teske
270febdb468SDevin TeskeCF__DEFINE_SHLIB_VARS
271febdb468SDevin TeskeCF_LD_SEARCHPATH
272febdb468SDevin Teske
273febdb468SDevin TeskeAC_OUTPUT(
274febdb468SDevin Teske	dialog-config
275febdb468SDevin Teske	makefile
276febdb468SDevin Teske	$EXTRA_OUTPUT
277febdb468SDevin Teske	$SUB_MAKEFILE,[
278febdb468SDevin TeskeCF__ADD_SHLIB_RULES(
279febdb468SDevin Teske	makefile,
280	$LIB_MODEL,
281	[\${LIB_OBJECT}],
282	[\${LIBS} \${LDFLAGS}])
283],[
284CF__INIT_SHLIB_RULES
285],[sort -u])
286