139 lines
2.7 KiB
Plaintext
139 lines
2.7 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
echo Configuring CU Sudo version 1.3.1
|
|
AC_INIT(sudo.h)
|
|
AC_CONFIG_HEADER(config.h pathnames.h)
|
|
dnl
|
|
dnl Variables that get substituted in the Makefile
|
|
dnl
|
|
PROGS="sudo visudo"
|
|
AC_SUBST(PROGS)dnl
|
|
STATIC_FLAGS=""
|
|
AC_SUBST(STATIC_FLAGS)dnl
|
|
INC_FLAGS=""
|
|
AC_SUBST(INC_FLAGS)dnl
|
|
OPTIONS=""
|
|
AC_SUBST(OPTIONS)dnl
|
|
dnl
|
|
dnl did they say --with-csops?
|
|
dnl
|
|
AC_WITH(csops, OPTIONS="${OPTIONS} -DUSE_INSULTS -DENV_EDITOR -DSHORT_MESSAGE"
|
|
echo 'CSOps--adding options: USE_INSULTS ENV_EDITOR SHORT_MESSAGE')
|
|
dnl
|
|
dnl C compiler checks
|
|
dnl
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
dnl
|
|
dnl what architecture are we on?
|
|
dnl
|
|
AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4) [SVR4="1"])
|
|
SUDO_AIX(OPTIONS="${OPTIONS} -DBROKEN_GETPASS"
|
|
[if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-bnoso -bI:/lib/syscalls.exp"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
dnl do we need to add -I/usr/ucbinclude to $CPP?
|
|
dnl
|
|
if test -n "$SVR4"; then
|
|
echo checking for /usr/ucbinclude
|
|
if test -d "/usr/ucbinclude"; then
|
|
INC_FLAGS="${INC_FLAGS} -I/usr/ucbinclude"
|
|
CPP="${CPP} -I/usr/ucbinclude"
|
|
fi
|
|
fi
|
|
dnl
|
|
if test -z "$SVR4"; then
|
|
SUDO_SUNOS([if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-Bstatic"
|
|
fi
|
|
])dnl
|
|
fi
|
|
dnl
|
|
SUDO_HPUX(OPTIONS="${OPTIONS} -DBROKEN_GETPASS"
|
|
[if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-Wl,-a,archive"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
SUDO_DEC_OSF1([if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-non_shared"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
SUDO_IRIX(OPTIONS="${OPTIONS} -DBROKEN_GETPASS")
|
|
dnl
|
|
SUDO_LINUX([STATIC_FLAGS="-static"])
|
|
dnl
|
|
SUDO_CONVEX()
|
|
dnl
|
|
SUDO_KSR()
|
|
dnl
|
|
dnl program checks
|
|
dnl
|
|
AC_GCC_TRADITIONAL
|
|
AC_PROG_YACC
|
|
AC_PROG_LEX
|
|
SUDO_PROG_INSTALL
|
|
SUDO_PROG_SENDMAIL
|
|
SUDO_PROG_VI
|
|
dnl
|
|
dnl Header file checks
|
|
dnl
|
|
AC_STDC_HEADERS
|
|
AC_HAVE_HEADERS(string.h)
|
|
AC_HAVE_HEADERS(strings.h)
|
|
AC_HAVE_HEADERS(unistd.h)
|
|
AC_HAVE_HEADERS(malloc.h)
|
|
AC_HAVE_HEADERS(paths.h)
|
|
AC_HAVE_HEADERS(termio.h)
|
|
AC_HAVE_HEADERS(termios.h)
|
|
dnl
|
|
dnl typedef checks
|
|
dnl
|
|
AC_MODE_T
|
|
AC_UID_T
|
|
AC_SIZE_T
|
|
AC_RETSIGTYPE
|
|
dnl
|
|
dnl function checks
|
|
dnl
|
|
AC_HAVE_FUNCS(getcwd)
|
|
AC_HAVE_FUNCS(strdup)
|
|
AC_HAVE_FUNCS(strchr)
|
|
AC_HAVE_FUNCS(strrchr)
|
|
dnl
|
|
dnl library checks
|
|
dnl
|
|
AC_IRIX_SUN
|
|
AC_HAVE_LIBRARY(bsd)
|
|
AC_HAVE_LIBRARY(BSD)
|
|
AC_HAVE_LIBRARY(socket)
|
|
AC_HAVE_LIBRARY(nsl)
|
|
AC_HAVE_LIBRARY(elf)
|
|
AC_HAVE_LIBRARY(malloc)
|
|
AC_HAVE_LIBRARY(shadow)
|
|
AC_HAVE_LIBRARY(ucb)
|
|
dnl SVR4 (or at least solaris 2.x) has -lucb in /usr/ucblib
|
|
if test -n "$SVR4"; then
|
|
echo checking for /usr/ucblib
|
|
if test -d "/usr/ucblib"; then
|
|
LIBS="-L/usr/ucblib ${LIBS}"
|
|
if test -r "/usr/ucblib/libucb.a" -a ! -r "/lib/libucb.a"; then
|
|
LIBS="${LIBS} -lucb"
|
|
fi
|
|
fi
|
|
fi
|
|
dnl
|
|
dnl Makefiles to substitute
|
|
dnl
|
|
AC_OUTPUT(Makefile visudoers/Makefile)
|