xref: /freebsd/contrib/dialog/configure.in (revision f4f33ea0c752ff0f9bfad34991d5bbb54e71133d)
1*f4f33ea0SBaptiste Daroussindnl $Id: configure.in,v 1.92 2018/06/18 08:59:49 tom Exp $
24c8945a0SNathan Whitehorndnl Process this file with autoconf to produce a configure script.
37a1c0d96SNathan Whitehorndnl ---------------------------------------------------------------------------
4*f4f33ea0SBaptiste Daroussindnl Copyright 1999-2016,2018 -- 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*f4f33ea0SBaptiste DaroussinAC_PREREQ(2.52.20170501)
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
50*f4f33ea0SBaptiste DaroussinCF_PROG_GROFF
51*f4f33ea0SBaptiste Daroussintest -z "$GROFF_NOTE" && NROFF_NOTE=
52*f4f33ea0SBaptiste Daroussin
534c8945a0SNathan Whitehorndnl needed for CF_WITH_LIBTOOL
54*f4f33ea0SBaptiste 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
65*f4f33ea0SBaptiste DaroussinCF_WITH_INSTALL_PREFIX
664c8945a0SNathan WhitehornCF_WITH_WARNINGS
67febdb468SDevin TeskeCF_PKG_CONFIG
684c8945a0SNathan Whitehorn
694c8945a0SNathan Whitehorndnl
707a1c0d96SNathan Whitehorndnl Allow dialog program and library to be renamed.
71febdb468SDevin TeskeAC_MSG_CHECKING(for this package's name)
727a1c0d96SNathan WhitehornAC_ARG_WITH(package,
737a1c0d96SNathan Whitehorn	[  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc],
747a1c0d96SNathan Whitehorn	[PACKAGE=$withval],
757a1c0d96SNathan Whitehorn	[PACKAGE=dialog])
76febdb468SDevin TeskeAC_MSG_RESULT($PACKAGE)
777a1c0d96SNathan WhitehornCF_VERSION_INFO(dialog,$PACKAGE)
787a1c0d96SNathan Whitehorn
79febdb468SDevin TeskeCFG_ROOTNAME=$PACKAGE
80febdb468SDevin TeskeHDR_ROOTNAME=$PACKAGE
81febdb468SDevin TeskeLIB_ROOTNAME=$PACKAGE
82febdb468SDevin Teske
83febdb468SDevin TeskeAC_SUBST(CFG_ROOTNAME)
84febdb468SDevin TeskeAC_SUBST(HDR_ROOTNAME)
85febdb468SDevin TeskeAC_SUBST(LIB_ROOTNAME)
86febdb468SDevin Teske
877a1c0d96SNathan Whitehorndnl
887a1c0d96SNathan Whitehorndnl If package is renamed, it is useful to have the dlg_XXX headers in a
897a1c0d96SNathan Whitehorndnl subdirectory (using the package name) so that multiple versions of the
907a1c0d96SNathan Whitehorndnl headers can coexist.
91febdb468SDevin TeskeAC_MSG_CHECKING(if we should install dlg_XXX headers to subdirectory)
927a1c0d96SNathan WhitehornAC_ARG_ENABLE(header-subdir,
937a1c0d96SNathan Whitehorn	[  --enable-header-subdir  install dlg_XXX headers to subdirectory],
947a1c0d96SNathan Whitehorn	[SUB_INC=$enableval],
957a1c0d96SNathan Whitehorn	[SUB_INC=no])
96febdb468SDevin TeskeAC_MSG_RESULT($SUB_INC)
977a1c0d96SNathan WhitehornAC_SUBST(SUB_INC)
987a1c0d96SNathan Whitehorn
99*f4f33ea0SBaptiste DaroussinCF_WITH_MAN2HTML
100*f4f33ea0SBaptiste Daroussin
1017a1c0d96SNathan Whitehorndnl
1024c8945a0SNathan Whitehorndnl Checks for libraries.
1034c8945a0SNathan Whitehorndnl
1044c8945a0SNathan WhitehornEXTRAOBJS=""
1054c8945a0SNathan WhitehornCF_BUNDLED_INTL(makefile,enable)
1064c8945a0SNathan WhitehornCF_MATH_LIB(,sqrt(x))
1074c8945a0SNathan Whitehorn
1084c8945a0SNathan WhitehornCF_WITH_NO_LEAKS
1094c8945a0SNathan Whitehorn
1104c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want --trace option],
1114c8945a0SNathan Whitehorn	trace,
1124c8945a0SNathan Whitehorn	[  --disable-trace         do not support --trace option],
1134c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS trace\$o"
1142a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
1154c8945a0SNathan Whitehorn
116febdb468SDevin TeskeCF_LD_RPATH_OPT
117febdb468SDevin TeskeCF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`)
1184c8945a0SNathan Whitehorn
1197a1c0d96SNathan WhitehornCF_WITH_CURSES_DIR
1207a1c0d96SNathan Whitehorn
121febdb468SDevin TeskeCF_ENABLE_RPATH
122febdb468SDevin Teske
123*f4f33ea0SBaptiste DaroussinCF_WITH_NCURSES_ETC
124*f4f33ea0SBaptiste 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
1324c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want config-file support],
1334c8945a0SNathan Whitehorn	rc-file,
1344c8945a0SNathan Whitehorn	[  --disable-rc-file       do not include config-file support],
1354c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS rc\$o"
1362a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_RC_FILE,1,[Define to 1 to include config-file support])],,$cf_all_widgets)
1374c8945a0SNathan Whitehorn
1384c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want Xdialog-style dialogs],
1394c8945a0SNathan Whitehorn	Xdialog,
1402a3e3873SBaptiste Daroussin	[  --disable-Xdialog       do not include Xdialog-style dialogs (1.1)],
1414c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
1422a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_XDIALOG,1,[Define to 1 to include Xdialog-style dialogs])],,$cf_all_widgets)
1432a3e3873SBaptiste Daroussin
1442a3e3873SBaptiste DaroussinCF_ARG_MSG_ENABLE([if you want extra Xdialog-style dialogs (1.2)],
1452a3e3873SBaptiste Daroussin	Xdialog2,
1462a3e3873SBaptiste Daroussin	[  --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)],
1472a3e3873SBaptiste Daroussin	[EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
1482a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_XDIALOG2,1,[Define to 1 to include extra Xdialog-style dialogs])],,$cf_all_widgets)
1492a3e3873SBaptiste Daroussin
1502a3e3873SBaptiste DaroussinCF_ARG_MSG_ENABLE([if you want compatibility with whiptail options],
1512a3e3873SBaptiste Daroussin	whiptail,
1522a3e3873SBaptiste Daroussin	[  --disable-whiptail      do not map extra whiptail options],
1532a3e3873SBaptiste Daroussin	[AC_DEFINE(HAVE_WHIPTAIL,1,[Define to 1 to include extra whiptail options])],,$cf_all_widgets)
1544c8945a0SNathan Whitehorn
1554c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the form dialog],
1564c8945a0SNathan Whitehorn	form,
1574c8945a0SNathan Whitehorn	[  --disable-form          do not include the form dialog],
1584c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS formbox\$o"
1592a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_FORMBOX,1,[Define to 1 to include the form dialog])],,$cf_all_widgets)
1604c8945a0SNathan Whitehorn
1614c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the gauge dialog],
1624c8945a0SNathan Whitehorn	gauge,
1634c8945a0SNathan Whitehorn	[  --disable-gauge         do not include the gauge dialogs],
1647a1c0d96SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
1652a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_GAUGE,1,[Define to 1 to include the gauge dialogs])],,$cf_all_widgets)
1664c8945a0SNathan Whitehorn
1674c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the tailbox dialog],
1684c8945a0SNathan Whitehorn	tailbox,
1694c8945a0SNathan Whitehorn	[  --disable-tailbox       do not include the tailbox dialog],
1704c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS tailbox\$o"
1712a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_TAILBOX,1,[Define to 1 to include the tailbox dialog])],,$cf_all_widgets)
1724c8945a0SNathan Whitehorn
1734c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the mixedform dialog],
1744c8945a0SNathan Whitehorn	mixedform,
1754c8945a0SNathan Whitehorn	[  --disable-mixedform     do not include the mixedform dialog],
1764c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS mixedform\$o"
177*f4f33ea0SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_MIXEDFORM,1,[Define to 1 to include the mixedform dialog])],,${enable_form:=$cf_all_widgets})
1784c8945a0SNathan Whitehorn
1794c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
1804c8945a0SNathan Whitehorn	mixedgauge,
1814c8945a0SNathan Whitehorn	[  --disable-mixedgauge    do not include the mixedgauge dialog],
1824c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
1832a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_MIXEDGAUGE,1,[Define to 1 to include the mixedgauge dialog])],,$cf_all_widgets)
1844c8945a0SNathan Whitehorn
1854c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want the wide-curses features],
1864c8945a0SNathan Whitehorn	widec,
1874c8945a0SNathan Whitehorn	[  --enable-widec          enable wide-curses features],
188*f4f33ea0SBaptiste Daroussin	[AC_DEFINE(USE_WIDE_CURSES,1,[Define to 1 to enable wide-curses features])],,$cf_cv_widec_curses)
1894c8945a0SNathan Whitehorn
1904c8945a0SNathan WhitehornAC_SUBST(EXTRAOBJS)
1914c8945a0SNathan Whitehorn
1924c8945a0SNathan Whitehorndnl
1934c8945a0SNathan Whitehorndnl Checks for header files.
1944c8945a0SNathan Whitehorndnl
1954c8945a0SNathan WhitehornAC_HEADER_STDC
1964c8945a0SNathan WhitehornAC_HEADER_TIME
1974c8945a0SNathan WhitehornAC_HEADER_DIRENT
198*f4f33ea0SBaptiste DaroussinAC_CHECK_HEADERS(search.h stdint.h unistd.h)
1994c8945a0SNathan WhitehornCF_CURSES_TERM_H
2004c8945a0SNathan Whitehorn
2014c8945a0SNathan Whitehorndnl
2024c8945a0SNathan Whitehorndnl Checks for library functions.
2034c8945a0SNathan Whitehorndnl
2044c8945a0SNathan WhitehornAC_TYPE_SIGNAL
2054c8945a0SNathan WhitehornAC_CHECK_FUNCS(\
2064c8945a0SNathan Whitehorn_nc_free_and_exit \
2077a1c0d96SNathan Whitehornbtowc \
2087a1c0d96SNathan Whitehornmblen \
2097a1c0d96SNathan Whitehornmbrlen \
2107a1c0d96SNathan Whitehornmbrtowc \
2117a1c0d96SNathan Whitehornmbtowc \
2124c8945a0SNathan Whitehornstrcasecmp \
2134c8945a0SNathan Whitehornstrftime \
2144c8945a0SNathan Whitehorntsearch \
2154c8945a0SNathan Whitehornwaitpid \
2167a1c0d96SNathan Whitehornwcsrtombs \
2177a1c0d96SNathan Whitehornwcstombs \
2187a1c0d96SNathan Whitehornwctob \
2197a1c0d96SNathan Whitehornwctomb \
220*f4f33ea0SBaptiste Daroussinmktime \
2214c8945a0SNathan Whitehorn)
2224c8945a0SNathan Whitehorn
2234c8945a0SNathan WhitehornCF_CURSES_FUNCS(\
2244c8945a0SNathan Whitehornflushinp \
2257a1c0d96SNathan Whitehorngetattrs \
2264c8945a0SNathan Whitehorngetbegx \
2274c8945a0SNathan Whitehorngetbegy \
2284c8945a0SNathan Whitehorngetbegyx \
2294c8945a0SNathan Whitehorngetcurx \
2304c8945a0SNathan Whitehorngetcury \
2314c8945a0SNathan Whitehorngetmaxx \
2324c8945a0SNathan Whitehorngetmaxy \
2334c8945a0SNathan Whitehorngetmaxyx \
2344c8945a0SNathan Whitehorngetparx \
2354c8945a0SNathan Whitehorngetpary \
2364c8945a0SNathan Whitehorngetparyx \
2374c8945a0SNathan Whitehornuse_default_colors \
238682c9e0fSNathan Whitehornwchgat \
2392a3e3873SBaptiste Daroussinwcursyncup \
2404c8945a0SNathan Whitehornwget_wch \
2412a3e3873SBaptiste Daroussinwsyncup \
2424c8945a0SNathan Whitehorn)
2434c8945a0SNathan Whitehorn
2442a3e3873SBaptiste DaroussinAC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR,1,[Define to 1 if (n)curses has start_color function])])
2454c8945a0SNathan WhitehornCF_CURSES_CHTYPE
2467a1c0d96SNathan WhitehornCF_CURSES_WACS_SYMBOLS
2472a3e3873SBaptiste DaroussinCF_CURSES_WGETPARENT
2484c8945a0SNathan WhitehornCF_FUNC_WAIT
2494c8945a0SNathan WhitehornCF_MBSTATE_T
250*f4f33ea0SBaptiste DaroussinCF_SIZECHANGE
2514c8945a0SNathan Whitehorn
2524c8945a0SNathan WhitehornCF_HEADERS_SH(DLG,dlg_config.h)
2534c8945a0SNathan Whitehorn
2542a3e3873SBaptiste DaroussinAC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])])
255*f4f33ea0SBaptiste DaroussinCF_NL_LANGINFO_1STDAY
2564c8945a0SNathan Whitehorn
2574c8945a0SNathan WhitehornCF_DISABLE_RPATH_HACK
2584c8945a0SNathan Whitehorn
259febdb468SDevin TeskeCF__DEFINE_SHLIB_VARS
260febdb468SDevin Teske
261febdb468SDevin TeskeAC_OUTPUT(
262febdb468SDevin Teske	dialog-config
263febdb468SDevin Teske	makefile
264febdb468SDevin Teske	$EXTRA_OUTPUT
265febdb468SDevin Teske	$SUB_MAKEFILE,[
266febdb468SDevin TeskeCF__ADD_SHLIB_RULES(
267febdb468SDevin Teske	makefile,
268febdb468SDevin Teske	$LIB_MODEL,
269febdb468SDevin Teske	[\${LIB_OBJECT}],
270febdb468SDevin Teske	[\${LIBS} \${LDFLAGS}])
271febdb468SDevin Teske],[
272febdb468SDevin TeskeCF__INIT_SHLIB_RULES
273febdb468SDevin Teske],[sort -u])
274