1*a96ef450SBaptiste Daroussindnl $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 --------------------------------------------------------------------------- 4*a96ef450SBaptiste 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 --------------------------------------------------------------------------- 30*a96ef450SBaptiste 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 50f4f33ea0SBaptiste DaroussinCF_PROG_GROFF 51f4f33ea0SBaptiste Daroussintest -z "$GROFF_NOTE" && NROFF_NOTE= 52f4f33ea0SBaptiste Daroussin 534c8945a0SNathan Whitehorndnl needed for CF_WITH_LIBTOOL 54f4f33ea0SBaptiste DaroussinCF_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 634c8945a0SNathan WhitehornCF_LARGEFILE 644c8945a0SNathan Whitehorn 65f4f33ea0SBaptiste DaroussinCF_WITH_INSTALL_PREFIX 66*a96ef450SBaptiste DaroussinCF_WITH_SCREEN_PDCURSES 67*a96ef450SBaptiste DaroussinCF_ENABLE_WARNINGS(,yes) 68febdb468SDevin TeskeCF_PKG_CONFIG 694c8945a0SNathan Whitehorn 704c8945a0SNathan 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], 757a1c0d96SNathan Whitehorn [PACKAGE=$withval], 767a1c0d96SNathan Whitehorn [PACKAGE=dialog]) 77febdb468SDevin TeskeAC_MSG_RESULT($PACKAGE) 787a1c0d96SNathan WhitehornCF_VERSION_INFO(dialog,$PACKAGE) 797a1c0d96SNathan Whitehorn 80febdb468SDevin TeskeCFG_ROOTNAME=$PACKAGE 81febdb468SDevin TeskeHDR_ROOTNAME=$PACKAGE 82febdb468SDevin TeskeLIB_ROOTNAME=$PACKAGE 83febdb468SDevin Teske 84febdb468SDevin TeskeAC_SUBST(CFG_ROOTNAME) 85febdb468SDevin TeskeAC_SUBST(HDR_ROOTNAME) 86febdb468SDevin TeskeAC_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], 967a1c0d96SNathan Whitehorn [SUB_INC=no]) 97febdb468SDevin TeskeAC_MSG_RESULT($SUB_INC) 987a1c0d96SNathan WhitehornAC_SUBST(SUB_INC) 997a1c0d96SNathan Whitehorn 100f4f33ea0SBaptiste DaroussinCF_WITH_MAN2HTML 101f4f33ea0SBaptiste Daroussin 1027a1c0d96SNathan Whitehorndnl 1034c8945a0SNathan Whitehorndnl Checks for libraries. 1044c8945a0SNathan Whitehorndnl 1054c8945a0SNathan WhitehornEXTRAOBJS="" 1064c8945a0SNathan WhitehornCF_BUNDLED_INTL(makefile,enable) 1074c8945a0SNathan WhitehornCF_MATH_LIB(,sqrt(x)) 1084c8945a0SNathan Whitehorn 1094c8945a0SNathan WhitehornCF_WITH_NO_LEAKS 1104c8945a0SNathan Whitehorn 1114c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want --trace option], 1124c8945a0SNathan Whitehorn trace, 1134c8945a0SNathan Whitehorn [ --disable-trace do not support --trace option], 1144c8945a0SNathan Whitehorn [EXTRAOBJS="$EXTRAOBJS trace\$o" 1152a3e3873SBaptiste Daroussin AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes) 1164c8945a0SNathan Whitehorn 117*a96ef450SBaptiste DaroussinCF_ENABLE_RPATH 118febdb468SDevin TeskeCF_LD_RPATH_OPT 119febdb468SDevin TeskeCF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`) 1204c8945a0SNathan Whitehorn 1217a1c0d96SNathan WhitehornCF_WITH_CURSES_DIR 1227a1c0d96SNathan Whitehorn 123f4f33ea0SBaptiste DaroussinCF_WITH_NCURSES_ETC 124f4f33ea0SBaptiste DaroussinCF_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 132*a96ef450SBaptiste Daroussincf_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" 137*a96ef450SBaptiste Daroussin AC_DEFINE(HAVE_RC_FILE,1,[Define to 1 to include config-file support])],cf_use_dialogrc=no,$cf_all_widgets) 138*a96ef450SBaptiste Daroussin 139*a96ef450SBaptiste Daroussincf_use_dialogrc2=yes 140*a96ef450SBaptiste Daroussinif test "$cf_use_dialogrc" = yes; then 141*a96ef450SBaptiste DaroussinCF_ARG_MSG_ENABLE([if you want extra attributes in config-file], 142*a96ef450SBaptiste Daroussin rc-file2, 143*a96ef450SBaptiste Daroussin [ --disable-rc-file2 do not use extra attributes in config-file], 144*a96ef450SBaptiste Daroussin [AC_DEFINE(HAVE_RC_FILE2,1,[Define to 1 to use extra attributes in config-file])],cf_use_dialogrc2=no,$cf_all_widgets) 145*a96ef450SBaptiste 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" 186f4f33ea0SBaptiste 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], 197f4f33ea0SBaptiste 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 207*a96ef450SBaptiste DaroussinAC_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(\ 2157a1c0d96SNathan Whitehornbtowc \ 2167a1c0d96SNathan Whitehornmblen \ 2177a1c0d96SNathan Whitehornmbrlen \ 2187a1c0d96SNathan Whitehornmbrtowc \ 2197a1c0d96SNathan Whitehornmbtowc \ 2204c8945a0SNathan Whitehornstrcasecmp \ 2214c8945a0SNathan Whitehornstrftime \ 2224c8945a0SNathan Whitehorntsearch \ 2234c8945a0SNathan Whitehornwaitpid \ 2247a1c0d96SNathan Whitehornwcsrtombs \ 2257a1c0d96SNathan Whitehornwcstombs \ 2267a1c0d96SNathan Whitehornwctob \ 2277a1c0d96SNathan Whitehornwctomb \ 228f4f33ea0SBaptiste Daroussinmktime \ 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 252*a96ef450SBaptiste DaroussinCF_CURSES_EXIT 253*a96ef450SBaptiste Daroussin 2542a3e3873SBaptiste DaroussinAC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR,1,[Define to 1 if (n)curses has start_color function])]) 2554c8945a0SNathan WhitehornCF_CURSES_CHTYPE 2567a1c0d96SNathan WhitehornCF_CURSES_WACS_SYMBOLS 2572a3e3873SBaptiste DaroussinCF_CURSES_WGETPARENT 2584c8945a0SNathan WhitehornCF_FUNC_WAIT 2594c8945a0SNathan WhitehornCF_MBSTATE_T 260f4f33ea0SBaptiste DaroussinCF_SIZECHANGE 2614c8945a0SNathan Whitehorn 2624c8945a0SNathan WhitehornCF_HEADERS_SH(DLG,dlg_config.h) 2634c8945a0SNathan Whitehorn 2642a3e3873SBaptiste DaroussinAC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])]) 265f4f33ea0SBaptiste DaroussinCF_NL_LANGINFO_1STDAY 2664c8945a0SNathan Whitehorn 267*a96ef450SBaptiste DaroussinCF_MERGE_EXTRA_CFLAGS 2684c8945a0SNathan WhitehornCF_DISABLE_RPATH_HACK 2694c8945a0SNathan Whitehorn 270febdb468SDevin TeskeCF__DEFINE_SHLIB_VARS 271*a96ef450SBaptiste DaroussinCF_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, 280febdb468SDevin Teske $LIB_MODEL, 281febdb468SDevin Teske [\${LIB_OBJECT}], 282febdb468SDevin Teske [\${LIBS} \${LDFLAGS}]) 283febdb468SDevin Teske],[ 284febdb468SDevin TeskeCF__INIT_SHLIB_RULES 285febdb468SDevin Teske],[sort -u]) 286