freebsd-dev/contrib/awk/configure.in

183 lines
4.1 KiB
Plaintext
Raw Normal View History

2000-08-15 10:02:07 +00:00
dnl
dnl configure.in --- autoconf input file for gawk
2001-11-02 21:06:08 +00:00
dnl
dnl Copyright (C) 1995-2001 the Free Software Foundation, Inc.
dnl
2000-08-15 10:02:07 +00:00
dnl This file is part of GAWK, the GNU implementation of the
dnl AWK Programming Language.
2001-11-02 21:06:08 +00:00
dnl
2000-08-15 10:02:07 +00:00
dnl GAWK is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
2001-11-02 21:06:08 +00:00
dnl
2000-08-15 10:02:07 +00:00
dnl GAWK 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. See the
dnl GNU General Public License for more details.
2001-11-02 21:06:08 +00:00
dnl
2000-08-15 10:02:07 +00:00
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(awk.h)
2001-11-02 21:06:08 +00:00
AC_PREREQ(2.13)
AM_INIT_AUTOMAKE(gawk, 3.1.0)
AM_CONFIG_HEADER(config.h:configh.in)
2000-08-15 10:02:07 +00:00
dnl Additional argument stuff
2001-11-02 21:06:08 +00:00
AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals], AC_DEFINE(HAVE_PORTALS))
2000-08-15 10:02:07 +00:00
dnl checks for programs
AC_PROG_YACC
AC_PROG_LN_S
AC_PROG_CC
AC_PROG_CPP
2001-11-02 21:06:08 +00:00
AC_PROG_RANLIB
2000-08-15 10:02:07 +00:00
# This is a hack. Different versions of install on different systems
# are just too different. Chuck it and use install-sh.
2001-11-02 21:06:08 +00:00
#
# If the user supplies $INSTALL, figure they know what they're doing.
if test "x$INSTALL" = "x"
then
INSTALL="$srcdir/install-sh -c"
export INSTALL
fi
2000-08-15 10:02:07 +00:00
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# This is mainly for my use during testing and development.
# Yes, it's a bit of a hack.
2001-11-02 21:06:08 +00:00
AC_MSG_CHECKING([for special development options])
2000-08-15 10:02:07 +00:00
if test -f $srcdir/.developing
then
2001-11-02 21:06:08 +00:00
# add other debug flags as appropriate, save GAWKDEBUG for emergencies
2000-08-15 10:02:07 +00:00
CFLAGS="$CFLAGS -DARRAYDEBUG"
2001-11-02 21:06:08 +00:00
# turn on compiler warnings if we're doing development
if test "$GCC" = yes
then
CFLAGS="$CFLAGS -Wall"
fi
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
2000-08-15 10:02:07 +00:00
fi
AC_SUBST(CFLAGS)
dnl checks for systems
AC_AIX
AC_ISC_POSIX
AC_MINIX
2001-11-02 21:06:08 +00:00
AC_SYS_LARGEFILE
2000-08-15 10:02:07 +00:00
GAWK_AC_AIX_TWEAK
2001-11-02 21:06:08 +00:00
GAWK_AC_LINUX_ALPHA
2000-08-15 10:02:07 +00:00
if test "$ISC" = 1 # will be set by test for ISC
then
dnl need -D_SYSV3 for ISC
CFLAGS="$CFLAGS -D_SYSV3"
fi
2001-11-02 21:06:08 +00:00
dnl check for C compiler for automake
AM_PROG_CC_STDC
AM_C_PROTOTYPES
ALL_LINGUAS="he"
AM_GNU_GETTEXT
2000-08-15 10:02:07 +00:00
dnl checks for header files
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
2001-11-02 21:06:08 +00:00
AC_CHECK_HEADERS(fcntl.h limits.h locale.h libintl.h mcheck.h \
netdb.h netinet/in.h signum.h stdarg.h string.h \
sys/param.h sys/socket.h unistd.h)
2000-08-15 10:02:07 +00:00
if test "$ac_cv_header_string_h" = yes
then
AC_CHECK_HEADERS(memory.h)
else
AC_CHECK_HEADERS(strings.h)
fi
dnl checks for typedefs
AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_SIZE_T
AC_TYPE_GETGROUPS
2001-11-02 21:06:08 +00:00
GAWK_AC_TYPE_SSIZE_T
2000-08-15 10:02:07 +00:00
AC_EGREP_HEADER([int.*sprintf], stdio.h,
AC_DEFINE(SPRINTF_RET, int),
AC_DEFINE(SPRINTF_RET, char *))
dnl checks for functions
AC_DEFINE(REGEX_MALLOC)
AC_FUNC_VPRINTF
2001-11-02 21:06:08 +00:00
dnl one day use [ AC_CHECK_TYPE(ssize_t, int) ]
GAWK_AC_FUNC_STRTOD_C89
AC_FUNC_MKTIME
case "$ac_cv_func_working_mktime" in
yes) AC_DEFINE(HAVE_MKTIME)
;;
esac
2000-08-15 10:02:07 +00:00
AC_CHECK_LIB(m, fmod)
2001-11-02 21:06:08 +00:00
AC_CHECK_FUNCS(memset memcpy memcmp fmod setlocale strchr strerror \
strftime strncasecmp strtod system tzset)
dnl check for dynamic linking
dnl This is known to be very primitive
AC_CHECK_HEADER(dlfcn.h,
AC_CHECK_LIB(dl, dlopen,
AC_DEFINE(DYNAMIC)
LIBS="$LIBS -ldl"
2000-08-15 10:02:07 +00:00
if test "$GCC" = yes
then
2001-11-02 21:06:08 +00:00
# Add others here as appropriate,
# one day use GNU libtool.
if uname | egrep -i linux > /dev/null
then
LDFLAGS="$LDFLAGS -rdynamic"
fi
2000-08-15 10:02:07 +00:00
fi
2001-11-02 21:06:08 +00:00
))
2000-08-15 10:02:07 +00:00
2001-11-02 21:06:08 +00:00
dnl check for how to use getpgrp
dnl have to hardwire it for VMS POSIX. Sigh.
dnl ditto for BeOS.
case `(uname) 2> /dev/null` in
*VMS*|*BeOS*)
AC_DEFINE(GETPGRP_VOID)
;;
*) AC_FUNC_GETPGRP
;;
esac
dnl check for sockets
GAWK_AC_LIB_SOCKETS
2000-08-15 10:02:07 +00:00
dnl checks for structure members
AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
dnl checks for compiler characteristics
AC_C_CHAR_UNSIGNED
AC_C_CONST
2001-11-02 21:06:08 +00:00
AC_C_INLINE
AC_C_STRINGIZE
AC_OUTPUT(Makefile \
awklib/Makefile \
doc/Makefile \
intl/Makefile \
po/Makefile.in \
test/Makefile)