--- projects/cms/source/idar/configure.in 2003/03/29 19:27:36 1.1 +++ projects/cms/source/idar/configure.in 2003/03/30 17:11:26 1.2 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # # configure.in for i-scream idar -# $Id: configure.in,v 1.1 2003/03/29 19:27:36 tdb Exp $ +# $Id: configure.in,v 1.2 2003/03/30 17:11:26 tdb Exp $ # # Change these to change the package name and version @@ -10,7 +10,7 @@ AC_INIT(idar, 1.0, dev@i-scream.org.uk) AM_INIT_AUTOMAKE(idar, 1.0) # Revision number (automatically updated) -AC_REVISION($Revision: 1.1 $) +AC_REVISION($Revision: 1.2 $) # Might work with older autoconfs... but tested on 2.57 AC_PREREQ(2.57) @@ -35,6 +35,19 @@ AC_ARG_WITH([libukcprog-prefix], ] ) +# User specified curses/ncurses prefix +AC_ARG_WITH([curses-prefix], + [ --with-curses-prefix=PATH curses (or ncurses) 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(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])]) @@ -47,6 +60,14 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_FORK +# Need curses or ncurses +MP_WITH_CURSES + +# Need libxml2 +AM_PATH_XML2 +CFLAGS="$CFLAGS $XML_CFLAGS" +LIBS="$LIBS $XML_LIBS" + # Figure out details about the host - we need the OS AC_CANONICAL_HOST @@ -55,26 +76,21 @@ AC_CANONICAL_HOST # 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]) LIBS="$LIBS -lnsl -lsocket -Wl,-Bstatic -lukcprog -Wl,-Bdynamic" ;; freebsd4.*) + AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) LIBS="$LIBS -lukcprog -static" ;; linux-gnu) + AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) LIBS="$LIBS -lukcprog -static" ;; *) AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) ;; esac - -# Library checks that need to be done after the OS specific stuff -AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) - -# Need libxml2 -AM_PATH_XML2 -CFLAGS="$CFLAGS $XML_CFLAGS" -LIBS="$LIBS $XML_LIBS" # And finish by changing these files AC_CONFIG_FILES([Makefile])