xref: /freebsd/contrib/dialog/configure.in (revision febdb468801f35e51c6c5c22221cfce9197c6f3b)
1*febdb468SDevin Teskednl $Id: configure.in,v 1.79 2013/09/02 14:02:57 tom Exp $
24c8945a0SNathan Whitehorndnl Process this file with autoconf to produce a configure script.
37a1c0d96SNathan Whitehorndnl ---------------------------------------------------------------------------
42a3e3873SBaptiste Daroussindnl Copyright 1999-2011,2012 -- 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.20011201)
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
47*febdb468SDevin TeskeCF_PROG_LN_S
482a3e3873SBaptiste DaroussinCF_PROG_LINT
494c8945a0SNathan Whitehorn
504c8945a0SNathan Whitehorndnl needed for CF_WITH_LIBTOOL
514c8945a0SNathan WhitehornAC_CHECK_TOOL(AR, ar, ar)
524c8945a0SNathan Whitehorn
534c8945a0SNathan WhitehornCF_MAKEFLAGS
544c8945a0SNathan WhitehornCF_MAKE_TAGS
554c8945a0SNathan WhitehornCF_DISABLE_ECHO
564c8945a0SNathan WhitehornCF_PROG_EXT
574c8945a0SNathan WhitehornCF_PATHSEP
584c8945a0SNathan WhitehornCF_LIB_PREFIX
594c8945a0SNathan WhitehornCF_XOPEN_SOURCE
604c8945a0SNathan WhitehornCF_LARGEFILE
614c8945a0SNathan Whitehorn
624c8945a0SNathan WhitehornCF_WITH_WARNINGS
63*febdb468SDevin TeskeCF_PKG_CONFIG
644c8945a0SNathan Whitehorn
654c8945a0SNathan Whitehorndnl
667a1c0d96SNathan Whitehorndnl Allow dialog program and library to be renamed.
67*febdb468SDevin TeskeAC_MSG_CHECKING(for this package's name)
687a1c0d96SNathan WhitehornAC_ARG_WITH(package,
697a1c0d96SNathan Whitehorn	[  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc],
707a1c0d96SNathan Whitehorn	[PACKAGE=$withval],
717a1c0d96SNathan Whitehorn	[PACKAGE=dialog])
72*febdb468SDevin TeskeAC_MSG_RESULT($PACKAGE)
737a1c0d96SNathan WhitehornCF_VERSION_INFO(dialog,$PACKAGE)
747a1c0d96SNathan Whitehorn
75*febdb468SDevin TeskeCFG_ROOTNAME=$PACKAGE
76*febdb468SDevin TeskeHDR_ROOTNAME=$PACKAGE
77*febdb468SDevin TeskeLIB_ROOTNAME=$PACKAGE
78*febdb468SDevin Teske
79*febdb468SDevin TeskeAC_SUBST(CFG_ROOTNAME)
80*febdb468SDevin TeskeAC_SUBST(HDR_ROOTNAME)
81*febdb468SDevin TeskeAC_SUBST(LIB_ROOTNAME)
82*febdb468SDevin Teske
837a1c0d96SNathan Whitehorndnl
847a1c0d96SNathan Whitehorndnl If package is renamed, it is useful to have the dlg_XXX headers in a
857a1c0d96SNathan Whitehorndnl subdirectory (using the package name) so that multiple versions of the
867a1c0d96SNathan Whitehorndnl headers can coexist.
87*febdb468SDevin TeskeAC_MSG_CHECKING(if we should install dlg_XXX headers to subdirectory)
887a1c0d96SNathan WhitehornAC_ARG_ENABLE(header-subdir,
897a1c0d96SNathan Whitehorn	[  --enable-header-subdir  install dlg_XXX headers to subdirectory],
907a1c0d96SNathan Whitehorn	[SUB_INC=$enableval],
917a1c0d96SNathan Whitehorn	[SUB_INC=no])
92*febdb468SDevin TeskeAC_MSG_RESULT($SUB_INC)
937a1c0d96SNathan WhitehornAC_SUBST(SUB_INC)
947a1c0d96SNathan Whitehorn
957a1c0d96SNathan Whitehorndnl
964c8945a0SNathan Whitehorndnl Checks for libraries.
974c8945a0SNathan Whitehorndnl
984c8945a0SNathan WhitehornEXTRAOBJS=""
994c8945a0SNathan WhitehornCF_BUNDLED_INTL(makefile,enable)
1004c8945a0SNathan WhitehornCF_MATH_LIB(,sqrt(x))
1014c8945a0SNathan Whitehorn
1024c8945a0SNathan WhitehornCF_WITH_NO_LEAKS
1034c8945a0SNathan Whitehorn
1044c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want --trace option],
1054c8945a0SNathan Whitehorn	trace,
1064c8945a0SNathan Whitehorn	[  --disable-trace         do not support --trace option],
1074c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS trace\$o"
1082a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
1094c8945a0SNathan Whitehorn
110*febdb468SDevin TeskeCF_LD_RPATH_OPT
111*febdb468SDevin TeskeCF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`)
1124c8945a0SNathan Whitehorn
1137a1c0d96SNathan WhitehornCF_WITH_CURSES_DIR
1147a1c0d96SNathan Whitehorn
115*febdb468SDevin TeskeCF_ENABLE_RPATH
116*febdb468SDevin Teske
1174c8945a0SNathan Whitehornuse_ncurses=no
1184c8945a0SNathan WhitehornAC_ARG_WITH(ncurses,
1194c8945a0SNathan Whitehorn	[  --with-ncurses          compile/link with ncurses library],
1204c8945a0SNathan Whitehorn	[use_ncurses=ncurses])
1214c8945a0SNathan WhitehornAC_ARG_WITH(ncursesw,
1224c8945a0SNathan Whitehorn	[  --with-ncursesw         compile/link with wide-char ncurses library],
1234c8945a0SNathan Whitehorn	[use_ncurses=ncursesw])
1244c8945a0SNathan Whitehornif test $use_ncurses != no ; then
1254c8945a0SNathan Whitehorn	cf_wide_curses=yes
1264c8945a0SNathan Whitehorn	if test $use_ncurses = ncursesw ; then
1274c8945a0SNathan Whitehorn		CF_UTF8_LIB
1284c8945a0SNathan Whitehorn	fi
1294c8945a0SNathan Whitehorn	CF_NCURSES_CONFIG($use_ncurses)
1304c8945a0SNathan Whitehornelse
1314c8945a0SNathan Whitehorn	cf_wide_curses=no
1324c8945a0SNathan Whitehorn	CF_CURSES_CONFIG
1334c8945a0SNathan Whitehornfi
1344c8945a0SNathan Whitehorn
1354c8945a0SNathan Whitehorncf_all_widgets=yes
1364c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want extra dialogs],
1374c8945a0SNathan Whitehorn	extras,
1384c8945a0SNathan Whitehorn	[  --disable-extras        do not include extra dialogs],
1394c8945a0SNathan Whitehorn	[cf_all_widgets=yes],[cf_all_widgets=no],yes)
1404c8945a0SNathan Whitehorn
1414c8945a0SNathan WhitehornCF_ARG_MSG_ENABLE([if you want config-file support],
1424c8945a0SNathan Whitehorn	rc-file,
1434c8945a0SNathan Whitehorn	[  --disable-rc-file       do not include config-file support],
1444c8945a0SNathan Whitehorn	[EXTRAOBJS="$EXTRAOBJS rc\$o"
1452a3e3873SBaptiste Daroussin	 AC_DEFINE(HAVE_RC_FILE,1,[Define to 1 to include config-file support])],,$cf_all_widgets)
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])],,$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_wide_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 unctrl.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 Whitehorn_nc_free_and_exit \
2167a1c0d96SNathan Whitehornbtowc \
2177a1c0d96SNathan Whitehornmblen \
2187a1c0d96SNathan Whitehornmbrlen \
2197a1c0d96SNathan Whitehornmbrtowc \
2207a1c0d96SNathan Whitehornmbtowc \
2214c8945a0SNathan Whitehornstrcasecmp \
2224c8945a0SNathan Whitehornstrftime \
2234c8945a0SNathan Whitehorntsearch \
2244c8945a0SNathan Whitehornwaitpid \
2257a1c0d96SNathan Whitehornwcsrtombs \
2267a1c0d96SNathan Whitehornwcstombs \
2277a1c0d96SNathan Whitehornwctob \
2287a1c0d96SNathan Whitehornwctomb \
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 DaroussinAC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR,1,[Define to 1 if (n)curses has start_color function])])
2534c8945a0SNathan WhitehornCF_CURSES_CHTYPE
2547a1c0d96SNathan WhitehornCF_CURSES_WACS_SYMBOLS
2552a3e3873SBaptiste DaroussinCF_CURSES_WGETPARENT
2564c8945a0SNathan WhitehornCF_FUNC_WAIT
2574c8945a0SNathan WhitehornCF_MBSTATE_T
2584c8945a0SNathan Whitehorn
2594c8945a0SNathan WhitehornCF_HEADERS_SH(DLG,dlg_config.h)
2604c8945a0SNathan Whitehorn
2612a3e3873SBaptiste DaroussinAC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])])
2624c8945a0SNathan Whitehorn
2634c8945a0SNathan WhitehornCF_DISABLE_RPATH_HACK
2644c8945a0SNathan Whitehorn
265*febdb468SDevin TeskeCF__DEFINE_SHLIB_VARS
266*febdb468SDevin Teske
267*febdb468SDevin TeskeAC_OUTPUT(
268*febdb468SDevin Teske	dialog-config
269*febdb468SDevin Teske	makefile
270*febdb468SDevin Teske	$EXTRA_OUTPUT
271*febdb468SDevin Teske	$SUB_MAKEFILE,[
272*febdb468SDevin TeskeCF__ADD_SHLIB_RULES(
273*febdb468SDevin Teske	makefile,
274*febdb468SDevin Teske	$LIB_MODEL,
275*febdb468SDevin Teske	[\${LIB_OBJECT}],
276*febdb468SDevin Teske	[\${LIBS} \${LDFLAGS}])
277*febdb468SDevin Teske],[
278*febdb468SDevin TeskeCF__INIT_SHLIB_RULES
279*febdb468SDevin Teske],[sort -u])
280