home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 mARCH
/
PCWK3A99.iso
/
Linux
/
DDD331
/
DDD-3_1_.000
/
DDD-3_1_
/
ddd-3.1.1
/
ddd
/
configure.in
< prev
next >
Wrap
Text File
|
1998-12-06
|
20KB
|
766 lines
dnl $Id: configure.in,v 1.175.4.2 1998/12/06 14:09:12 zeller Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright (C) 1995-1998 Technische Universitaet Braunschweig, Germany.
dnl Written by Andreas Zeller <zeller@ips.cs.tu-bs.de>.
dnl
dnl This file is part of DDD.
dnl
dnl DDD is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl
dnl DDD is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl See the GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public
dnl License along with DDD -- see the file COPYING.
dnl If not, write to the Free Software Foundation, Inc.,
dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl DDD is the data display debugger.
dnl For details, see the DDD World-Wide-Web page,
dnl `http://www.cs.tu-bs.de/softech/ddd/',
dnl or send a mail to the DDD developers <ddd@ips.cs.tu-bs.de>.
dnl
dnl
dnl
dnl
dnl
dnl
dnl Revision Control
dnl
AC_PREREQ(2.12)dnl
AC_REVISION($Revision: 1.175.4.2 $)
dnl
dnl
dnl Initialization - setup names and paths
dnl
AC_INIT(DispBox.h)
AC_CONFIG_HEADER(config.h)
AC_PREFIX_PROGRAM(ddd)
AC_ARG_PROGRAM
dnl
dnl
dnl Autoconf 2.8 bug fix
dnl
ac_cv_lib_dnet=no
dnl
dnl Zdenek Sekera <zs@cray.com> says that if CDPATH is set, it may break
dnl this script.
dnl
unset CDPATH
dnl
dnl Autoconf 2.12 bug fix (occurs on sparc-sun-solaris2.5.1)
ac_cv_func_vfork_works=yes
dnl
dnl
dnl
dnl Name and version number
dnl *This* is the place where name and version numbers are defined.
AC_MSG_CHECKING(for product name)
dnl
dnl The product name, in various capitalizations.
ddd=ddd
Ddd=Ddd
DDD=DDD
dnl
dnl The product version, in the form `MAJOR-NUMBER.MINOR-NUMBER[.PATCHLEVEL]'
dnl A version in the form `YYYY-MM-DD' is a release-of-the-day, i.e. a
dnl snapshot of the current development tree.
VERSION=3.1.1
dnl
dnl The version nickname.
NICKNAME="Morning Sky"
dnl
dnl The product expiration date, in ISO 8601 YYYY-MM-DD format.
dnl After this date, users are requested to update the product.
dnl An empty expiration date means no expiration.
EXPIRES=
dnl
dnl
AC_SUBST(ddd)dnl
AC_SUBST(Ddd)dnl
AC_SUBST(DDD)dnl
AC_SUBST(VERSION)dnl
AC_SUBST(NICKNAME)dnl
AC_MSG_RESULT(${DDD} ${VERSION} \"${NICKNAME}\")
dnl
dnl
AC_MSG_CHECKING(for expiration date)
dnl
AC_SUBST(EXPIRES)dnl
if test "$EXPIRES" = ""; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(${EXPIRES})
fi
AM_INIT_AUTOMAKE(${ddd}, ${VERSION})
dnl
dnl
dnl
dnl
dnl
dnl
dnl Find out what host this is
dnl
AC_CANONICAL_HOST
AC_SUBST(host)
dnl
dnl
dnl Check for POSIX stuff (required by AC_FIND_X)
dnl
AC_ISC_POSIX
dnl
dnl
dnl
dnl
dnl Locate programs
dnl
AC_PROG_LN_S
AC_PATH_PROGS(SH, sh)
AC_CHECK_PROGS(TAR, gtar tar)
AC_CHECK_PROGS(M4, gm4 m4)
AC_CHECK_PROGS(SED, gsed sed)
AC_CHECK_PROGS(DIFF, gdiff diff)
AC_CHECK_PROGS(DVIPS, dvips dvi2ps)
AC_CHECK_PROGS(COMPRESS, gzip compress)
COMPRESS="$COMPRESS -c"
case "$COMPRESS" in
*gzip*) COMPRESS="$COMPRESS -9";;
esac
AC_CHECK_PROGS(UNCOMPRESS, gzip gunzip gzcat zcat uncompress)
case "$UNCOMPRESS" in
*gzip*) UNCOMPRESS="$UNCOMPRESS -d";;
esac
case "$UNCOMPRESS" in
*zip*) UNCOMPRESS="$UNCOMPRESS -c";;
*uncompress*) UNCOMPRESS="$UNCOMPRESS -c";;
esac
AC_PATH_PROGS(RSH, remsh rsh on)
AC_CHECK_PROGS(LPR, lp lpr)
if test "$LPR" = "lpr"; then
PRINT_COMMAND="lpr"
elif test "$LPR" = "lp"; then
PRINT_COMMAND="lp -c"
else
PRINT_COMMAND="lp"
fi
AC_SUBST(PRINT_COMMAND)dnl
AC_CHECK_PROGS(GCORE, gcore)
if test "$GCORE" = "gcore"; then
GCORE_COMMAND="gcore -o @FILE@ @PID@"
else
GCORE_COMMAND=
fi
AC_SUBST(GCORE_COMMAND)dnl
AC_CHECK_PROGS(DEBUGGER, gdb dbx xdb jdb)dnl
case "$DEBUGGER" in
*gdb*) DEBUGGER_OPTION="";;
*dbx*) DEBUGGER_OPTION="--dbx";;
*xdb*) DEBUGGER_OPTION="--xdb";;
*jdb*) DEBUGGER_OPTION="--jdb";;
esac
case "$DEBUGGER" in
gdb) ;;
dbx) ;;
xdb) ;;
jdb) ;;
*) DEBUGGER_OPTION="$DEBUGGER_OPTION --debugger $DEBUGGER";
esac
AC_SUBST(DEBUGGER_OPTION)dnl
AC_CHECK_PROGS(XTERM, xterm kterm dtterm hpterm, xterm)dnl
AC_CHECK_PROGS(XFONTSEL, xfontsel, xfontsel)dnl
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_YACC
AC_MSG_CHECKING(for ${YACC} flags)
YFLAGS=""
AC_MSG_RESULT(${YFLAGS})
AC_SUBST(YFLAGS)dnl
AM_PROG_LEX
AC_MSG_CHECKING(for ${LEX} flags)
LFLAGS=""
if test "$LEX" = "flex"; then
LFLAGS="-8"
fi
AC_MSG_RESULT(${LFLAGS})
AC_SUBST(LFLAGS)dnl
AC_PROG_AWK
dnl
dnl Find and check C/C++ compilers
dnl
ICE_PROG_CC
ICE_PROG_CXX
dnl
dnl
dnl Find and check C/C++ preprocessors
dnl
AC_PROG_CPP
AC_PROG_CXXCPP
dnl
dnl
dnl Check for compiler characteristics
dnl
dnl ICE_CXX_PROBLEMATIC_VERSION
dnl ICE_CXX_INCLUDE_DIR
dnl ICE_CXX_LIB_DIR
ICE_CXX_OPTIONS
ICE_CXX_BOOL
ICE_CXX_EXPLICIT
ICE_CXX_MUTABLE
ICE_CXX_EXCEPTIONS
ICE_CXX_STD_EXCEPTIONS
ICE_CXX_NAMESPACE
ICE_CXX_TYPEINFO
ICE_CXX_LONG_LONG
ICE_CXX_NAMED_RETURN_VALUES
ICE_CXX_PRETTY_FUNCTION
ICE_CXX_ARRAY_OPERATOR_NEW
ICE_CXX_PLACEMENT_NEW
ICE_CXX_LIFETIME_OF_TEMPORARIES
ICE_PROG_CPP_TRADITIONAL
dnl
dnl
dnl Check for .exe extension (used in the Windows/Cygwin32 environment)
dnl
AM_EXEEXT
dnl
dnl
dnl The C++ compiler is set up. Use it for further checks.
dnl
AC_LANG_CPLUSPLUS
dnl
dnl
dnl
dnl
dnl Locate Libraries
dnl
dnl Check for networking functions in C++ runtime library.
dnl Zdenek Sekera <zs@cray.com> reports that SGI IRIX 6.x has these in -lc.
ddd_have_connect_in_libc=no
AC_CHECK_FUNC(connect, ddd_have_connect_in_libc=yes)
ddd_have_gethostbyname_in_libc=no
AC_CHECK_FUNC(gethostbyname, ddd_have_gethostbyname_in_libc=yes)
ddd_have_regcmp_in_libc=no
AC_CHECK_FUNC(regcmp, ddd_have_regcmp_in_libc=yes)
dnl
dnl
if test "$ddd_have_connect_in_libc" != yes; then
dnl Solaris 2.6 wants an explicit `-lsocket' before `-lnsl'.
dnl Reported by Emmanuel Engel <Emmanuel.Engel@lri.fr>
dnl
dnl Andreas Buschmann <Andreas.Buschmann@ks.sel.alcatel.de> says that
dnl libsocket may _not_ go into LIBS, because otherwise the X11
dnl configuration on Solaris will not find -lsocket -lnsl anymore.
AC_CHECK_LIB(socket, connect, LIBSOCKET="-lsocket")
AC_SUBST(LIBSOCKET)
fi
dnl
if test "$ddd_have_gethostbyname_in_libc" != yes; then
AC_CHECK_LIB(nsl, gethostbyname, LIBNSL="-lnsl")
fi
AC_SUBST(LIBNSL)
dnl
if test "$ddd_have_regcmp_in_libc" != yes; then
AC_CHECK_LIB(gen, regcmp, LIBGEN="-lgen")
fi
AC_SUBST(LIBGEN)
dnl
dnl
dnl Check for -ly, -lm, and -lc libraries. These should always be present.
AC_CHECK_LIB(y, yyerror, LIBY="-ly")
AC_SUBST(LIBY)
dnl
AC_CHECK_LIB(m, sin, LIBM="-lm")
AC_SUBST(LIBM)
dnl
AC_CHECK_LIB(c, open, LIBC="-lc")
AC_SUBST(LIBC)
dnl
dnl
dnl
dnl Marc Lepage <mlepage@kingston.hummingbird.com> reports that
dnl the Digital UNIX native compiler wants -lcxxinst to get
dnl template instantiations. Do this only if not GCC.
dnl
if test "$GXX" != yes; then
AC_CHECK_LIB(cxxinst, main, CXXLIBS="-lcxxinst $CXXLIBS")
fi
dnl
dnl
dnl Look for the tgetent() function - either in libtermcap, libcurses,
dnl or use the GNU termcap library as shipped with DDD.
dnl
dnl On FreeBSD systems, `-lmytinfo' is preferred to `-lncurses'.
dnl Reported by Vincenzo Capuano <vcapuano@esoc.esa.de>
dnl
dnl On Linux ELF systems, `-lncurses' is preferred to `-ltermcap'.
dnl Reported by jdassen@wi.leidenuniv.nl (J.H.M. Dassen)
dnl
LIBTERMCAP="../termcap/libtermcap.a"
for termlib in mytinfo ncurses curses termcap terminfo termlib; do
AC_CHECK_LIB(${termlib}, tgetent, [LIBTERMCAP="-l${termlib}"; break])
done
AC_SUBST(LIBTERMCAP)
dnl
dnl
dnl The `-liberty' library per definition contains only functions
dnl missing in system libraries.
LIBIBERTY="../libiberty/libiberty.a"
dnl
dnl Prefer the installed one over the one shipped with DDD.
AC_CHECK_LIB(iberty, xstrerror, LIBIBERTY="-liberty")
dnl
AC_SUBST(LIBIBERTY)
dnl
dnl
dnl
dnl
dnl Check for X stuff
dnl
dnl
dnl Check X options
dnl
if test "$with_x" = no; then
AC_MSG_ERROR([$DDD requires the X window system to compile and run.
Please do not use the configure option '--without-x'.])
fi
if test "$with_motif" = no; then
AC_MSG_ERROR([$DDD requires Motif to compile and run.
Please do not use the configure option '--without-motif'.])
fi
dnl
dnl
dnl Check for X libraries
dnl
if test "$with_x" != no; then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
dnl
AC_PATH_XTRA
ICE_FIND_MOTIF
ICE_FIND_ATHENA
ICE_FIND_XPM
dnl
dnl Autoconf bug fix: Sun CC 3.0 requires `-R lib', g++ requires `-Rlib'.
changequote(,)dnl
case "$CXX" in
*CC) X_LIBS="`echo $X_LIBS | $SED 's, -R\([^ ]\), -R \1,g'`"
esac
changequote([,])dnl
dnl
dnl
dnl
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
dnl
dnl Check for X library
dnl
X11_LIBS=""
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS})
if test "$X11_LIBS" = ""; then
dnl Not having X is fatal. Let the user fix this.
AC_MSG_ERROR([The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
AC_SUBST(X_LIBS)
AC_SUBST(X11_LIBS)
AC_SUBST(X_PRE_LIBS)
dnl
dnl
dnl Check for -lXintl library. Lutz Kittler <kittler@sse-erfurt.de> says
dnl that DLD-Linux with CDE wants `-lXintl' to refine `Xlcmbcurmax'.
dnl Guenther Roehrich <guenther@studbox.uni-stuttgart.de> says that
dnl we must check for `_Xlcmbcurmax' instead of `Xlcmbcurmax'.
dnl
AC_CHECK_LIB(Xintl, _Xlcmbcurmax, X11_LIBS="${X11_LIBS} -lXintl",,
${X_PRE_LIBS} ${X11_LIBS})
dnl
dnl
dnl Check for -lipc library. SCO unix is said to want that.
dnl
AC_CHECK_LIB(ipc, shmap, X11_LIBS="${X11_LIBS} -lipc",,
${X_PRE_LIBS} ${X11_LIBS})
dnl
dnl
dnl Check for X toolkit libraries
dnl
XT_LIBS=""
AC_CHECK_LIB(Xt, XtToolkitInitialize, XT_LIBS="-lXt",,
${X_PRE_LIBS} ${X11_LIBS})
if test "$XT_LIBS" = ""; then
dnl Not having Xt is fatal. Let the user fix this.
AC_MSG_ERROR([The X toolkit library '-lXt' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
AC_SUBST(XT_LIBS)
dnl
dnl
dnl Check for X extension libraries
dnl
dnl
XEXT_LIBS=""
AC_CHECK_LIB(Xext, XShapeQueryVersion, XEXT_LIBS="-lXext",,
${X_PRE_LIBS} ${X11_LIBS})
AC_SUBST(XEXT_LIBS)
dnl
dnl
dnl
dnl Check for Athena widget libraries
dnl
dnl
XAW_LIBS=""
if test "$athena_includes" != "no" && test "$athena_libraries" != "no"
then
AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation,
XAW_LIBS="-lXmu ${XAW_LIBS}",,
${X_PRE_LIBS} ${XAW_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS})
AC_CHECK_LIB(Xaw, XawTextSetInsertionPoint,
XAW_LIBS="-lXaw ${XAW_LIBS}"
AC_DEFINE(HAVE_ATHENA),,
${X_PRE_LIBS} ${XAW_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS})
if test "$XAW_LIBS" = ""; then
dnl A warning suffices here -- DDD also works without Athena.
AC_MSG_WARN([The Athena widgets library '-lXaw' could not be found.
If you have the athena library, please use the
configure options '--with-athena-includes=DIR' and
'--with-athena-libraries=DIR' to specify the Xaw location.
If you do not have the athena library, use the configure
option '--without-athena' to suppress this message.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
fi
if test "$XAW_LIBS" != ""; then
AC_CHECK_HEADERS(X11/Xaw/Form.h X11/Xaw/Panner.h X11/Xaw/Porthole.h)
AC_CHECK_HEADERS(X11/Xmu/Editres.h)
fi
AC_SUBST(XAW_LIBS)
dnl
dnl
dnl Check for Xpm library and headers
dnl
XPM_LIBS=""
if test "$xpm_includes" != "no" && test "$xpm_libraries" != "no"
then
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromXpmImage,
XPM_LIBS="-lXpm"
AC_DEFINE(HAVE_XPM),,${X_PRE_LIBS} ${X11_LIBS})
if test "$XPM_LIBS" != ""; then
AC_CHECK_HEADERS(X11/xpm.h xpm.h)
fi
fi
AC_SUBST(XPM_LIBS)
dnl
dnl
dnl Check for Motif widget libraries
dnl
dnl
XM_LIBS=""
XP_LIBS=""
if test "$motif_includes" != "no" && test "$motif_libraries" != "no"
then
dnl Motif 2.1 wants `-lXp' (X11R6.3 print server)
AC_CHECK_LIB(Xp, XpSelectInput,
XP_LIBS="-lXp"
AC_DEFINE(HAVE_XP),,
${X_PRE_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${LIBGEN})
dnl
AC_CHECK_LIB(Xm, XmCreateOptionMenu,
XM_LIBS="-lXm"
AC_DEFINE(HAVE_MOTIF),,
${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${LIBGEN})
dnl
AC_CHECK_LIB(Xm, xmUseVersion,
AC_DEFINE(HAVE_XMUSEVERSION),,
${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${LIBGEN})
fi
if test "$XM_LIBS" = ""; then
dnl Without Motif, we won't get far. Let the user fix this.
AC_MSG_ERROR([The Motif library '-lXm' could not be found.
Please use the configure options '--with-motif-includes=DIR'
and '--with-motif-libraries=DIR' to specify the Xm location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
AC_SUBST(XP_LIBS)
AC_SUBST(XM_LIBS)
dnl
dnl Check for `baseTranslations' resource
ICE_TRANSLATION_RESOURCE
dnl
dnl
dnl
dnl
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
dnl
dnl
dnl Check for Make characteristics
dnl
AC_PROG_MAKE_SET
dnl
dnl
dnl Find types
dnl
dnl The getgroups() check fails with SGI CC. Use the C compiler instead.
AC_LANG_SAVE
AC_LANG_C
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
AC_LANG_RESTORE
dnl
ICE_TYPE_SIG_HANDLER_ARGS
dnl
dnl
dnl Find libraries and functions
dnl
AC_CHECK_FUNC(getpgrp)
AC_CHECK_FUNC(setpgrp)
dnl
dnl The getprgp() check fails with SGI CC. Use the C compiler instead.
AC_LANG_SAVE
AC_LANG_C
AC_FUNC_GETPGRP
AC_FUNC_SETPGRP
AC_LANG_RESTORE
dnl
dnl
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS(alloca.h fcntl.h limits.h malloc.h netdb.h pwd.h regex.h rx.h)
AC_CHECK_HEADERS(stdlib.h string.h strings.h termio.h termios.h unistd.h)
AC_CHECK_HEADERS(sys/ioctl.h sys/int_types.h sys/param.h sys/resource.h)
AC_CHECK_HEADERS(sys/stat.h sys/stropts.h sys/vty.h sys/sysmacros.h sys/core.h)
AC_CHECK_HEADERS(sys/socket.h sys/termios.h sys/time.h sys/timeb.h sys/types.h)
AC_CHECK_HEADERS(sys/utsname.h sys/user.h sys/ptrace.h)
AC_CHECK_HEADERS(exception stdexcept)
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_STAT_MACROS_BROKEN
dnl
dnl These checks may require `-lstdc++' to link and run properly
ice_save_LIBS="$LIBS"
LIBS="$CXXLIBS $LIBS"
ICE_CHECK_CORE_MAGIC
ICE_CHECK_PTRACE_DUMPCORE
ICE_CHECK_FROZEN_OSTRSTREAM
ICE_OSTRSTREAM_PCOUNT_BROKEN
ICE_TYPE_REGEX_T
dnl
dnl The regexec() check fails with SGI CC. Use the C compiler instead.
AC_LANG_SAVE
AC_LANG_C
ICE_REGCOMP_BROKEN
AC_LANG_RESTORE
dnl
LIBS="$ice_save_LIBS"
dnl
ICE_CHECK_DECL(_getpty, unistd.h)
ICE_CHECK_DECL(alloca, alloca.h stdlib.h)
ICE_CHECK_DECL(asctime, time.h)
ICE_CHECK_DECL(clock, time.h)
ICE_CHECK_DECL(difftime, time.h)
ICE_CHECK_DECL(dup2, unistd.h)
ICE_CHECK_DECL(endpwent, pwd.h)
ICE_CHECK_DECL(fcntl, fcntl.h)
ICE_CHECK_DECL(ftime, sys/timeb.h)
ICE_CHECK_DECL(gethostbyname, netdb.h)
ICE_CHECK_DECL(gethostname, unistd.h)
ICE_CHECK_DECL(getpty, unistd.h)
ICE_CHECK_DECL(getrlimit, sys/resource.h)
ICE_CHECK_DECL(getrusage, sys/resource.h)
ICE_CHECK_DECL(getwd, unistd.h)
ICE_CHECK_DECL(grantpt, stdlib.h)
ICE_CHECK_DECL(hypot, math.h)
ICE_CHECK_DECL(ioctl, unistd.h sys/ioctl.h)
ICE_CHECK_DECL(link, unistd.h)
ICE_CHECK_DECL(lstat, sys/stat.h)
ICE_CHECK_DECL(malloc, stdlib.h)
ICE_CHECK_DECL(memcpy, string.h)
ICE_CHECK_DECL(memset, string.h)
ICE_CHECK_DECL(pclose, stdio.h)
ICE_CHECK_DECL(popen, stdio.h)
ICE_CHECK_DECL(ptrace, unistd.h sys/ptrace.h)
ICE_CHECK_DECL(ptsname, stdlib.h)
ICE_CHECK_DECL(raise, signal.h)
ICE_CHECK_DECL(rand, stdlib.h)
ICE_CHECK_DECL(random, stdlib.h)
ICE_CHECK_DECL(readlink, unistd.h)
ICE_CHECK_DECL(setbuf, stdio.h)
ICE_CHECK_DECL(setpgid, unistd.h)
ICE_CHECK_DECL(setpgrp, unistd.h)
ICE_CHECK_DECL(setpgrp2, unistd.h)
ICE_CHECK_DECL(setpwent, pwd.h)
ICE_CHECK_DECL(setrlimit, sys/resource.h)
ICE_CHECK_DECL(setsid, unistd.h)
ICE_CHECK_DECL(setvbuf, stdio.h)
ICE_CHECK_DECL(sigblock, signal.h)
ICE_CHECK_DECL(sigprocmask, signal.h)
ICE_CHECK_DECL(sigsetmask, signal.h)
ICE_CHECK_DECL(sigsuspend, signal.h)
ICE_CHECK_DECL(srand, stdlib.h)
ICE_CHECK_DECL(srandom, stdlib.h)
ICE_CHECK_DECL(stat, sys/stat.h)
ICE_CHECK_DECL(strerror, string.h)
ICE_CHECK_DECL(strftime, time.h)
ICE_CHECK_DECL(strsignal, string.h)
ICE_CHECK_DECL(strtod, stdlib.h)
ICE_CHECK_DECL(strtol, stdlib.h)
ICE_CHECK_DECL(strtoul, stdlib.h)
ICE_CHECK_DECL(symlink, unistd.h)
ICE_CHECK_DECL(tcdrain, termios.h)
ICE_CHECK_DECL(tcflow, termios.h)
ICE_CHECK_DECL(tcflush, termios.h)
ICE_CHECK_DECL(tcgetattr, termios.h)
ICE_CHECK_DECL(tcgetpgrp, unistd.h)
ICE_CHECK_DECL(tcgetsid, sys/termios.h)
ICE_CHECK_DECL(tcsendbreak, termios.h)
ICE_CHECK_DECL(tcsetattr, termios.h)
ICE_CHECK_DECL(tcsetpgrp, unistd.h)
ICE_CHECK_DECL(times, sys/times.h)
ICE_CHECK_DECL(uname, sys/utsname.h)
ICE_CHECK_DECL(unlink, unistd.h)
ICE_CHECK_DECL(unlockpt, stdlib.h)
ICE_CHECK_DECL(waitpid, sys/wait.h)
dnl
dnl These checks may require -lstdc++ to link and tun properly
ice_save_LIBS="$LIBS"
LIBS="$CXXLIBS $LIBS"
ICE_CHECK_PATH_MAX
ICE_CHECK_POSIX_PATH_MAX
ICE_CHECK_MAXPATHLEN
LIBS="$ice_save_LIBS"
dnl
dnl
dnl Check for a POSIX.2 regcomp()/regexec() library
LIBRX="../librx/librx.a"
if test "$ice_have_regcomp" = yes && test "$ice_have_regexec" = yes && test "$ice_cv_regcomp_broken" = no; then
dnl No need to use the GNU regcomp() library - there's one in the system
LIBRX=""
fi
AC_SUBST(LIBRX)
dnl
dnl
dnl As of DDD 2.2, we don't need all this RX stuff, but use
dnl a LEX-generated scanner for regexps.
dnl
AC_DEFINE(WITH_RUNTIME_REGEX, 0)
AC_DEFINE(RUNTIME_REGEX, 0)
dnl
dnl
dnl User-defined options
dnl
AC_ARG_ENABLE(builtin-manual,
[ --disable-builtin-manual do not compile manual into DDD],
builtin_manual="$enableval", builtin_manual=yes)
AC_ARG_ENABLE(builtin-app-defaults,
[ --disable-builtin-app-defaults do not compile app-defaults file into DDD],
builtin_app_defaults="$enableval", builtin_app_defaults=yes)
dnl
if test "$builtin_manual" != no; then
AC_DEFINE(WITH_BUILTIN_MANUAL)
fi
if test "$builtin_app_defaults" != no; then
AC_DEFINE(WITH_BUILTIN_APP_DEFAULTS)
fi
dnl
dnl
dnl Check for risky LessTif versions.
dnl
risky_lesstif=false
ice_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_TRY_CPP([#include <Xm/Xm.h>
#ifdef LESSTIF_VERSION
#if LESSTIF_VERSION == 0 && LESSTIF_REVISION <= 86
#error LessTif 0.86 or earlier
#endif
#endif], risky_lesstif=false, risky_lesstif=true)
CPPFLAGS="$ice_save_CPPFLAGS"
dnl
dnl
dnl Check for risky CC versions.
dnl
risky_cc=false
# Warn about old SGI CC versions.
case "$CXX" in
*CC)
if test "$host_vendor" = "sgi" && test "$ice_cv_have_bool" != yes; then
risky_cc=true
fi
;;
*)
;;
esac
dnl
# Warn about old xlC versions.
case "$CXX" in
*xlC)
if test "$ice_cv_have_bool" != yes; then
risky_cc=true
fi
;;
*)
;;
esac
dnl
dnl
dnl
dnl That's all, folks!
dnl
AC_OUTPUT(Makefile vr.h Ddd ddd.man .gdbinit, date > stamp-h)
dnl
dnl
dnl Give some warnings
dnl
if test "$silent" != yes; then
dnl
if $risky_cc; then
echo
echo "configure: This $CXX version may not generate safe $DDD code."
echo "Use GCC instead or continue at own risk."
fi
dnl
if $risky_lesstif; then
echo
echo "configure: This $DDD release requires LessTif 0.87 or later."
echo "Upgrade to a recent LessTif version or continue at own risk."
fi
dnl
fi
dnl
dnl Give an indication of what to do next.
dnl
if test "$silent" != yes; then
echo
echo "configure: configuration is done. Type \`make' to make $DDD."
echo "In case of trouble, please check the settings in the files generated"
echo "by \`configure' - that is, \`ddd/config.h' and \`ddd/Makefile'."
echo
fi
exit 0