| 1 | dnl -*-fundamental-*- |
| 2 | dnl |
| 3 | dnl $Id: configure.in,v 1.1 1997/07/21 13:47:51 mdw Exp $ |
| 4 | dnl |
| 5 | dnl Source for auto configuration for `become' |
| 6 | dnl |
| 7 | dnl (c) 1997 Mark Wooding |
| 8 | dnl |
| 9 | |
| 10 | dnl----- Licencing notice --------------------------------------------------- |
| 11 | dnl |
| 12 | dnl This file is part of `become' |
| 13 | dnl |
| 14 | dnl `Become' is free software; you can redistribute it and/or modify |
| 15 | dnl it under the terms of the GNU General Public License as published by |
| 16 | dnl the Free Software Foundation; either version 2 of the License, or |
| 17 | dnl (at your option) any later version. |
| 18 | dnl |
| 19 | dnl `Become' is distributed in the hope that it will be useful, |
| 20 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | dnl GNU General Public License for more details. |
| 23 | dnl |
| 24 | dnl You should have received a copy of the GNU General Public License |
| 25 | dnl along with `become'; if not, write to the Free Software |
| 26 | dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 27 | |
| 28 | dnl----- Revision history --------------------------------------------------- |
| 29 | dnl |
| 30 | dnl $Log: configure.in,v $ |
| 31 | dnl Revision 1.1 1997/07/21 13:47:51 mdw |
| 32 | dnl Initial revision |
| 33 | dnl |
| 34 | |
| 35 | AC_INIT(icrypt.c) |
| 36 | AC_CONFIG_HEADER(config.h) |
| 37 | VERSION=1.1 AC_SUBST(VERSION) |
| 38 | AC_DEFINE(VERSION, "1.1 (22 February 1997)") |
| 39 | |
| 40 | dnl --- Check for compilers and things --- |
| 41 | |
| 42 | AC_PROG_CC |
| 43 | AC_PROG_INSTALL |
| 44 | AC_PROG_LEX |
| 45 | AC_CHECK_PROG(AR, ar, ar) |
| 46 | AC_PROG_RANLIB |
| 47 | AC_PROG_YACC |
| 48 | if test "$ac_cv_prog_gcc" = "yes"; then |
| 49 | CFLAGS="$CFLAGS -pedantic -Wall" |
| 50 | fi |
| 51 | |
| 52 | dnl --- Libraries --- |
| 53 | |
| 54 | AC_CHECK_LIB(socket, socket) |
| 55 | MDW_LIB_RESOLVER |
| 56 | |
| 57 | dnl --- Types --- |
| 58 | |
| 59 | AC_TYPE_PID_T |
| 60 | AC_TYPE_UID_T |
| 61 | |
| 62 | dnl --- Check on endianness --- |
| 63 | |
| 64 | AC_C_BIGENDIAN(yes) |
| 65 | |
| 66 | dnl --- Check on type sizes --- |
| 67 | |
| 68 | AC_CHECK_SIZEOF(int) |
| 69 | |
| 70 | dnl --- Set the path separator --- |
| 71 | |
| 72 | AC_DEFINE(PATHSEP, '/') |
| 73 | |
| 74 | dnl --- Debugging stuff --- |
| 75 | |
| 76 | AC_ARG_ENABLE(debugging, |
| 77 | [--enable-debugging spews vast swathes of useless information], |
| 78 | [if test "$enableval" = "no"; then |
| 79 | AC_DEFINE(NDEBUG, 1) |
| 80 | fi], |
| 81 | AC_DEFINE(NDEBUG, 1)) |
| 82 | |
| 83 | dnl --- Yell^H^H^H^HNetwork Information System --- |
| 84 | |
| 85 | AC_ARG_ENABLE(yp, |
| 86 | [--enable-yp read user names using ypcat], |
| 87 | [if test "$enableval" != "no"; then |
| 88 | AC_DEFINE(HAVE_YP, 1) |
| 89 | fi], |
| 90 | MDW_CHECK_YP) |
| 91 | |
| 92 | dnl --- Define where things get put --- |
| 93 | |
| 94 | mdw_save_prefix="$prefix" |
| 95 | test "x$prefix" = "xNONE" && prefix="$ac_default_prefix" |
| 96 | AC_DEFINE_UNQUOTED(ETCDIR, "`eval echo ${sysconfdir}`") |
| 97 | prefix="$mdw_save_prefix" |
| 98 | |
| 99 | dnl --- Done --- |
| 100 | |
| 101 | AC_OUTPUT(Makefile) |
| 102 | |
| 103 | dnl----- That's all, folks -------------------------------------------------- |