1997-02-04 11:53:45 +03:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(backend/access/common/heaptuple.c)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
case "$host_os" in
|
1997-02-07 13:18:35 +03:00
|
|
|
solaris*)
|
|
|
|
case "$host_cpu" in
|
|
|
|
sparc) PORTNAME='sparc_solaris' ;;
|
|
|
|
i386) PORTNAME='i386_solaris' ;;
|
|
|
|
esac ;;
|
|
|
|
linux*) PORTNAME='linux' ;;
|
|
|
|
bsdi*) PORTNAME='bsdi' ;;
|
1997-02-09 07:34:07 +03:00
|
|
|
freebsd*|netbsd*) PORTNAME='BSD44_derived';;
|
1997-02-07 13:18:35 +03:00
|
|
|
dgux*) PORTNAME='dgux';;
|
|
|
|
aix*) PORTNAME='aix';;
|
|
|
|
nextstep*) PORTNAME='nextstep';;
|
1997-02-08 06:29:31 +03:00
|
|
|
ultrix*) PORTNAME='ultrix4';;
|
1997-02-12 08:17:19 +03:00
|
|
|
irix*) PORTNAME='irix5';;
|
1997-02-04 11:53:45 +03:00
|
|
|
*) echo ""
|
|
|
|
echo "*************************************************************"
|
|
|
|
echo "configure does not currently recognize your operating system,"
|
|
|
|
echo "therefore you must do a manual configuration of:"
|
|
|
|
echo ""
|
|
|
|
echo "Please contact scrappy@hub.org to see about rectifying this, "
|
|
|
|
echo "including the above 'checking host system type...' line "
|
|
|
|
echo "*************************************************************"
|
|
|
|
echo ""
|
|
|
|
exit;;
|
|
|
|
esac
|
1997-02-09 07:34:07 +03:00
|
|
|
AC_LINK_FILES(port/${PORTNAME}.h, include/os.h)
|
1997-02-04 11:53:45 +03:00
|
|
|
AC_SUBST(PORTNAME)
|
1997-02-06 00:22:07 +03:00
|
|
|
AC_SUBST(LDFLAGS)
|
|
|
|
AC_SUBST(CPPFLAGS)
|
1997-02-04 11:53:45 +03:00
|
|
|
|
|
|
|
AC_CONFIG_HEADER(include/config.h)
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
|
|
|
dnl ****************************************************************
|
|
|
|
dnl Hold off on the C++ stuff until we can figure out why it doesn't
|
|
|
|
dnl work under Solaris..
|
|
|
|
dnl
|
|
|
|
dnl AC_PROG_CXX
|
|
|
|
dnl
|
|
|
|
dnl Check if we should set Have_Cplusplus
|
|
|
|
dnl if test -n "$CXX"; then
|
|
|
|
dnl export HAVECXX
|
|
|
|
dnl HAVECXX='HAVE_Cplusplus=true'
|
|
|
|
dnl fi
|
|
|
|
dnl AC_SUBST(HAVECXX)
|
|
|
|
dnl ****************************************************************
|
|
|
|
HAVECXX='HAVE_Cplusplus=false'
|
|
|
|
AC_SUBST(HAVECXX)
|
|
|
|
|
|
|
|
dnl AC_PROG_INSTALL was broken on my machine (NAT), so here's an
|
|
|
|
dnl alternative, built from the various portname options
|
|
|
|
AC_PATH_PROG(INSTALL, install, /usr/bin:/usr/ucb:/home/tools/bin)
|
|
|
|
AC_PATH_PROG(BSDINST, bsdinst, /usr/bin/X11:/usr/X11R6/bin:/sbin)
|
|
|
|
INSTLOPTS="-m 444"
|
|
|
|
INSTL_EXE_OPTS="-m 555"
|
|
|
|
INSTL_LIB_OPTS="-m 664"
|
|
|
|
if test -n "$INSTALL"; then
|
|
|
|
INSTLOPTS="-c $INSTLOPTS"
|
|
|
|
INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
|
|
|
|
INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS"
|
|
|
|
else
|
|
|
|
INSTALL=$BSDINST
|
|
|
|
fi
|
|
|
|
AC_SUBST(INSTALL)
|
|
|
|
AC_SUBST(INSTLOPTS)
|
|
|
|
AC_SUBST(INSTL_LIB_OPTS)
|
|
|
|
AC_SUBST(INSTL_EXE_OPTS)
|
|
|
|
|
|
|
|
dnl Check the option to echo to inhibit newlines.
|
|
|
|
ECHO_N_OUT=`echo -n "" | wc -c`
|
|
|
|
ECHO_C_OUT=`echo "\c" | wc -c`
|
|
|
|
if test "$ECHO_N_OUT" -eq 0; then
|
|
|
|
DASH_N='-n'
|
|
|
|
BACKSLASH_C=
|
|
|
|
else
|
|
|
|
if test "ECHO_C_OUT" -eq 0; then
|
|
|
|
DASH_N=
|
1997-02-04 12:16:08 +03:00
|
|
|
BACKSLASH_C='\\\\c'
|
1997-02-04 11:53:45 +03:00
|
|
|
else
|
|
|
|
AC_MSG_ERROR("echo behaviour undetermined")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(DASH_N)
|
|
|
|
AC_SUBST(BACKSLASH_C)
|
|
|
|
|
|
|
|
AC_PROG_LEX
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PATH_PROG(find, find)
|
|
|
|
AC_PATH_PROG(tar, tar)
|
|
|
|
AC_PATH_PROG(split, split)
|
|
|
|
AC_PATH_PROG(etags, etags)
|
|
|
|
AC_PATH_PROG(xargs, xargs)
|
|
|
|
AC_PATH_PROG(ipcs, ipcs)
|
|
|
|
AC_PATH_PROG(ipcrm, ipcrm)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(curses, main)
|
|
|
|
AC_CHECK_LIB(termcap, main)
|
1997-02-06 08:05:04 +03:00
|
|
|
AC_CHECK_LIB(history, main)
|
|
|
|
AC_CHECK_LIB(readline, main)
|
|
|
|
AC_CHECK_LIB(readline, write_history, AC_DEFINE(HAVE_HISTORY))
|
1997-02-04 11:53:45 +03:00
|
|
|
AC_CHECK_LIB(m, main)
|
|
|
|
AC_CHECK_LIB(dl, main)
|
|
|
|
AC_CHECK_LIB(socket, main)
|
|
|
|
AC_CHECK_LIB(nsl, main)
|
|
|
|
AC_CHECK_LIB(ipc, main)
|
|
|
|
AC_CHECK_LIB(IPC, main)
|
|
|
|
AC_CHECK_LIB(lc, main)
|
|
|
|
AC_CHECK_LIB(dld, main)
|
|
|
|
AC_CHECK_LIB(ln, main)
|
|
|
|
AC_CHECK_LIB(bsd, main)
|
|
|
|
AC_CHECK_LIB(ld, main)
|
|
|
|
AC_CHECK_LIB(compat, main)
|
|
|
|
AC_CHECK_LIB(BSD, main)
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
|
1997-02-06 11:40:16 +03:00
|
|
|
AC_CHECK_HEADERS(readline.h history.h dld.h)
|
1997-02-04 11:53:45 +03:00
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
|
|
|
dnl Check for any "odd" conditions
|
1997-02-06 08:30:50 +03:00
|
|
|
AC_MSG_CHECKING(for int timezone)
|
1997-02-04 11:53:45 +03:00
|
|
|
AC_TRY_LINK([#include <time.h>],
|
1997-02-06 08:30:50 +03:00
|
|
|
[int res = timezone / 60; ],
|
|
|
|
[AC_DEFINE(HAVE_INT_TIMEZONE), AC_MSG_RESULT(yes)],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for union semun)
|
|
|
|
AC_TRY_LINK([#include <sys/types.h>
|
1997-02-06 23:55:03 +03:00
|
|
|
#include <sys/ipc.h>
|
1997-02-06 08:30:50 +03:00
|
|
|
#include <sys/sem.h>],
|
|
|
|
[union semun semun;],
|
|
|
|
[AC_DEFINE(HAVE_UNION_SEMUN) AC_MSG_RESULT(yes)],
|
|
|
|
AC_MSG_RESULT(no))
|
1997-02-04 11:53:45 +03:00
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
|
1997-02-09 06:33:38 +03:00
|
|
|
AC_CHECK_FUNCS(sigprocmask waitpid setsid)
|
1997-02-05 01:39:56 +03:00
|
|
|
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
|
1997-02-09 06:23:52 +03:00
|
|
|
AC_CHECK_FUNC(strdup, STRDUP='../../utils/strdup.o')
|
1997-02-05 01:39:56 +03:00
|
|
|
AC_SUBST(INET_ATON)
|
1997-02-09 06:23:52 +03:00
|
|
|
AC_SUBST(STRDUP)
|
1997-02-04 11:53:45 +03:00
|
|
|
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
|
|
|
|
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT)))
|
|
|
|
|
1997-02-09 06:23:52 +03:00
|
|
|
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile)
|