--- projects/cms/source/idar/configure.in 2003/03/29 19:27:36 1.1 +++ projects/cms/source/idar/configure.in 2004/01/05 15:59:52 1.11 @@ -2,15 +2,15 @@ # 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.11 2004/01/05 15:59:52 tdb Exp $ # # Change these to change the package name and version -AC_INIT(idar, 1.0, dev@i-scream.org.uk) -AM_INIT_AUTOMAKE(idar, 1.0) +AC_INIT(idar, 1.2, bugs@i-scream.org) +AM_INIT_AUTOMAKE(idar, 1.2) # Revision number (automatically updated) -AC_REVISION($Revision: 1.1 $) +AC_REVISION($Revision: 1.11 $) # 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 -I${withval}/include/ncurses ${CPPFLAGS}" + fi + ] +) + # Checks for header files AC_HEADER_STDC AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])]) @@ -46,35 +59,38 @@ AC_C_CONST AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_FORK +AC_CHECK_FUNCS(strlcpy) +AC_CHECK_FUNCS(atoll) +# 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 # Set things up for different OS's -# We define the name of the OS so the code can act accordingly -# We also need to add the right LDFLAGS +# We need to add the right LDFLAGS case $host_os in solaris2.*) - LIBS="$LIBS -lnsl -lsocket -Wl,-Bstatic -lukcprog -Wl,-Bdynamic" + LIBS="$LIBS -lnsl -lsocket" ;; -freebsd4.*) - LIBS="$LIBS -lukcprog -static" - ;; -linux-gnu) - 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])]) +LIBS="$LIBS -lukcprog" -# Need libxml2 -AM_PATH_XML2 -CFLAGS="$CFLAGS $XML_CFLAGS" -LIBS="$LIBS $XML_LIBS" +# Check for the --with-server-name option +AC_ARG_WITH([server-name], [ --with-server-name=NAME default server name (default: i-scream)], [servername=$withval], [servername=[i-scream]]) +AC_DEFINE_UNQUOTED([DEF_SERVER_NAME], ["$servername"], [Default Server Name]) + +# Check for the --with-server-port option +AC_ARG_WITH([server-port], [ --with-server-port=PORT default server port (default: 4510)], [serverport=$withval], [serverport=[4510]]) +AC_DEFINE_UNQUOTED([DEF_SERVER_PORT], [$serverport], [Default Server Port]) # And finish by changing these files AC_CONFIG_FILES([Makefile])