1dnl Gone configure script. Compile with autoconf. 2dnl $MCom: gone/configure.in,v 1.3 2010/08/01 05:53:03 marcus Exp $ 3 4undefine([Irix]) 5undefine([FreeBSD]) 6undefine([Linux]) 7undefine([Ultrix]) 8undefine([OSF1]) 9 10AC_INIT(gone.c) 11AC_CONFIG_HEADER(config.h) 12 13AC_ARG_PROGRAM 14 15PRODUCT=gone 16VERSION=1.3.6 17AC_DEFINE_UNQUOTED(PRODUCT, "$PRODUCT") 18AC_DEFINE_UNQUOTED(VERSION, "$VERSION") 19AC_SUBST(PRODUCT) 20AC_SUBST(VERSION) 21 22AC_PROG_GCC_TRADITIONAL 23AC_PROG_INSTALL 24 25AC_CHECK_HEADERS(crypt.h sys/stat.h sys/param.h sys/stat.h errno.h \ 26termios.h sys/time.h time.h sys/termio.h string.h sys/ioctl.h sys/consio.h) 27LIBS= 28AC_CHECK_LIB(crypt, crypt, [LIBS="-lcrypt"; break]) 29 30if test "$with_setuid" = ""; then 31 if test -x /usr/ucb/id ; then 32 UID=`/usr/xpg4/bin/id -u -r` 33 else 34 UID=`id -u -r` 35 fi 36 if test "$UID" = 0; then 37 echo " " 38 echo "Gone gives you the option of installing itself setuid to root." 39 echo "If you choose to install gone in this manner, you will be able" 40 echo "to use your login password as your gone password by giving gone" 41 echo -n "the -p option. Should I install gone setuid (enter 'yes' for setuid)?" 42 43 read with_setuid 44 fi 45fi 46 47AC_MSG_CHECKING(for OS type) 48OSTYPE=`uname -s` 49AC_DEFINE_UNQUOTED(OSTYPE, "$OSTYPE") 50AC_SUBST(OSTYPE) 51if test "$OSTYPE" = "OSF1" && test "$SETUID_Q" = "yes"; then 52 AC_DEFINE(OSF1,1) 53 AC_SUBST(OSF1) 54 AC_MSG_RESULT(DEC UNIX) 55 SEC=`rcmgr get SECURITY` 56 AC_SUBST(SEC) 57 AC_MSG_CHECKING(for DU security type) 58 if test "$SEC" = "ENHANCED"; then 59 AC_MSG_RESULT(system using Enhanced Security) 60 AC_CHECK_LIB(security, getespwent, [LIBS="-lsecurity $LIBS"; break]) 61 AC_CHECK_LIB(db, set_auth_parameters, [LIBS="-ldb $LIBS"; break]) 62 AC_SUBST(LIBS) 63 AC_DEFINE(EN_SEC,1) 64 AC_SUBST(EN_SEC) 65 else 66 AC_MSG_RESULT(system using Base Security) 67 fi 68elif test "$OSTYPE" = "ULTRIX"; then 69 AC_DEFINE(ULTRIX,1) 70 AC_SUBST(ULTRIX) 71 AC_MSG_RESULT(ULTRIX) 72elif test "$OSTYPE" = "IRIX"; then 73 AC_DEFINE(IRIX,1) 74 AC_SUBST(IRIX) 75 AC_MSG_RESULT(IRIX) 76else 77 AC_MSG_RESULT("$OSTYPE") 78fi 79 80if test "$with_setuid" = "yes"; then 81 AC_CHECK_HEADERS(sys/types.h pwd.h) 82 AC_DEFINE(SETUID,1) 83 AC_SUBST(SETUID) 84 INSTALL_PROGRAM="$INSTALL -o root -m 4755" 85 AC_SUBST(INSTALL_PROGRAM) 86fi 87 88AC_OUTPUT(Makefile) 89