1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
dnl Process this file with autoconf to produce a configure script
dnl This file is part of SeX
dnl "@(#)SeX:$Id: configure.in,v 1.2 1996/07/23 12:52:27 liw Exp $"
AC_INIT(sex.c)
changequote(,)dnl
srcdir="`cd $srcdir; pwd`"
objdir="`pwd`"
ASSERT="-DNDEBUG"
PUBNAME=pub
changequote([,])dnl
AC_SUBST(ASSERT)
AC_SUBST(PUBINC)
AC_SUBST(PUBLIB)
AC_SUBST(PUBNAME)
AC_SUBST(x_libraries)
AC_SUBST(x_includes)
AC_ARG_WITH(assert,[ --with-assert Generate code for assertions],ASSERT="",ASSERT="-DNDEBUG")
AC_ARG_WITH(autoconf,[ --with-noautoconf Don't use autoconf, even if available],AUTOCONF=":")
AC_ARG_WITH(pubincdir,[ --with-pubincdir=x Find Publib headers in directory x],PUBINC="-I$withval")
AC_ARG_WITH(publibdir,[ --with-publibdir=x Find Publib library files in directory x],PUBLIB="-L$withval")
AC_ARG_WITH(publib,[ --with-publib=x Use -lx to link Publib (default -lpub)],PUBNAME="$withval")
AC_SUBST(objdir)
CPPFLAGS="$CPPFLAGS $PUBINC"
LDFLAGS="$LDFLAGS $PUBLIB"
AC_PROG_CC
AC_PATH_X
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CHECK_PROG(MAKE,gmake,gmake,make)
if test "x$PUBNAME" = "x"; then
AC_CHECK_LIB(pub,sbuf_create,,exit 1)
fi
AC_CHECK_HEADER(publib.h,,exit 1)
if test "$AUTOCONF" != "no"
then
AC_CHECK_PROG(AUTOCONF,autoconf,autoconf,:)
fi
AC_OUTPUT(Makefile)
|