119 lines
2.2 KiB
Plaintext
119 lines
2.2 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 find "uname"
|
|
dnl
|
|
AC_PROGRAM_CHECK(UNAMEPROG, uname, uname ,)
|
|
dnl
|
|
dnl what architecture are we on?
|
|
dnl
|
|
SUDO_SUNOS(echo "Looks like SunOS"
|
|
[if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-Bstatic"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
SUDO_SOLARIS(echo "Looks like Solaris")
|
|
dnl
|
|
SUDO_AIX(echo "Looks like AIX"
|
|
OPTIONS="${OPTIONS} -DBROKEN_GETPASS"
|
|
[if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-bnoso -bI:/lib/syscalls.exp"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
SUDO_HPUX(echo "Looks like HP-UX"
|
|
OPTIONS="${OPTIONS} -DBROKEN_GETPASS"
|
|
[if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-Wl,-a,archive"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
SUDO_DEC_OSF1(echo "Looks like OSF/1"
|
|
[if test -n "$GCC"; then
|
|
STATIC_FLAGS="-static"
|
|
else
|
|
STATIC_FLAGS="-non_shared"
|
|
fi
|
|
])dnl
|
|
dnl
|
|
SUDO_IRIX(echo "Looks like IRIX"
|
|
OPTIONS="${OPTIONS} -DBROKEN_GETPASS")
|
|
dnl
|
|
SUDO_LINUX(echo "Looks like linux"
|
|
[STATIC_FLAGS="-static"])
|
|
dnl
|
|
SUDO_CONVEX(echo "Looks like ConvexOS")
|
|
dnl
|
|
SUDO_KSR(echo "Looks like a 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 strings.h unistd.h malloc.h paths.h termio.h 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 strdup strchr strrchr sysconf)
|
|
dnl
|
|
dnl library checks
|
|
dnl
|
|
AC_HAVE_LIBRARY(nsl)
|
|
AC_HAVE_LIBRARY(shadow)
|
|
AC_HAVE_LIBRARY(ufc)
|
|
dnl
|
|
dnl These are os-dependent, they should probably go with the os checks
|
|
dnl
|
|
AC_IRIX_SUN
|
|
AC_HAVE_LIBRARY(bsd)
|
|
AC_HAVE_LIBRARY(BSD)
|
|
dnl
|
|
dnl Substitute into the Makefiles
|
|
dnl
|
|
AC_OUTPUT(Makefile visudoers/Makefile)
|