--- projects/cms/source/ihost/configure.in 2003/03/21 14:32:35 1.17 +++ projects/cms/source/ihost/configure.in 2003/05/20 13:57:47 1.25 @@ -2,15 +2,15 @@ # Process this file with autoconf to produce a configure script. # # configure.in for i-scream ihost -# $Id: configure.in,v 1.17 2003/03/21 14:32:35 tdb Exp $ +# $Id: configure.in,v 1.25 2003/05/20 13:57:47 tdb Exp $ # # Change these to change the package name and version -AC_INIT(ihost, 1.5.4, dev@i-scream.org.uk) -AM_INIT_AUTOMAKE(ihost, 1.5.4) +AC_INIT(ihost, 1.5.6, dev@i-scream.org) +AM_INIT_AUTOMAKE(ihost, 1.5.6) # Revision number (automatically updated) -AC_REVISION($Revision: 1.17 $) +AC_REVISION($Revision: 1.25 $) # Might work with older autoconfs... but tested on 2.57 AC_PREREQ(2.57) @@ -21,7 +21,6 @@ AM_CONFIG_HEADER(config.h) # Checks for programs AC_PROG_CC AC_PROG_INSTALL -AC_PROG_RANLIB # User specified libstatgrab prefix AC_ARG_WITH([libstatgrab-prefix], @@ -36,9 +35,23 @@ AC_ARG_WITH([libstatgrab-prefix], ] ) +# User specified libukcprog prefix +AC_ARG_WITH([libukcprog-prefix], + [ --with-libukcprog-prefix=PATH libukcprog is in PATH], + [ + if test -d "$withval/lib"; then + LDFLAGS="-L${withval}/lib ${LDFLAGS}" + fi + if test -d "$withval/include"; then + CPPFLAGS="-I${withval}/include ${CPPFLAGS}" + fi + ] +) + # Checks for header files AC_HEADER_STDC AC_CHECK_HEADERS(statgrab.h,,[AC_MSG_ERROR([need statgrab.h])]) +AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])]) # Checks for typedefs, structures, and compiler characteristics AC_C_CONST @@ -61,18 +74,21 @@ AM_CONDITIONAL(SETGIDKMEM, false) # We also need to add the right LDFLAGS case $host_os in solaris2.*) + AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])],[-lnsl -lsocket]) AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) - LIBS="$LIBS -lnsl -lsocket -lkstat -Wl,-Bstatic -lstatgrab -Wl,-Bdynamic" + LIBS="$LIBS -lnsl -lsocket -lkstat -Wl,-Bstatic -lstatgrab -lukcprog -Wl,-Bdynamic" ;; freebsd4.*) + AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) - LIBS="$LIBS -lkvm -lstatgrab -static" + LIBS="$LIBS -lstatgrab -lkvm -ldevstat -lukcprog -static" # FreeBSD needs ihost to be setgid kmem AM_CONDITIONAL(SETGIDKMEM, true) ;; linux-gnu) + AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) AC_DEFINE(LINUX, , [Building on GNU/Linux]) - LIBS="$LIBS -lstatgrab -static" + LIBS="$LIBS -lstatgrab -lukcprog -static" ;; *) AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) @@ -92,6 +108,6 @@ AC_ARG_WITH([log-file], [ --with-log-file=FILE loc AC_DEFINE_UNQUOTED([LOG_FILE], ["$logfile"], [Location of log file]) # And finish by changing these files -AC_CONFIG_FILES([Makefile libukcprog/Makefile]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT