AC_PREREQ([2.60]) AC_INIT(geovis, 0.4, rappture@nanohub.org) AC_CONFIG_AUX_DIR(cf) AC_ARG_WITH( [tcllib], [AS_HELP_STRING([--with-tcllib[=DIR]], [location of Tcl binary library libtclstubs.a @<:@default=/usr/lib@:>@])], [with_tcllib=$withval], [with_tcllib=""]) AC_ARG_WITH( [osg-includes], [AS_HELP_STRING([--with-osg-includes=DIR], [OSG include files are in DIR])], [with_osg_includes=$withval], [with_osg_includes=""]) AC_ARG_WITH( [osg-libs], [AS_HELP_STRING([--with-osg-libs=DIR], [OSG libraries are in DIR])], [with_osg_libs=$withval], [with_osg_libs=""]) AC_ARG_WITH( [statsdir], [AS_HELP_STRING([--with-statsdir=DIR], [Write statistics in DIR])], [STATSDIR=$withval], [STATSDIR="/var/tmp/visservers"]) #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ if test "${prefix}" = "NONE"; then prefix=/usr/local fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi if test "x${incdir}" == "x"; then incdir=${exec_prefix}/include fi libdir=${exec_prefix}/lib if test "${libdir}" != "${prefix}/lib"; then LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}" else LIB_SEARCH_DIRS="-L ${libdir}" fi AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LN_S AC_PROG_MKDIR_P dnl find and test the C compiler AC_PROG_CC AC_PROG_CPP AC_PROG_CXXCPP AC_PROG_CXX AC_LANG_CPLUSPLUS # # Need to check for the following dependencies: # Tcl headers and library # GL headers and library # pthread library # OpenSceneGraph libraries # osgEarth libraries # TCL_VERSION="8.4" for dir in \ ${exec_prefix} \ ${exec_prefix}/lib ; do tclconfig="${dir}/tclConfig.sh" if test -f "$tclconfig" ; then . $tclconfig break fi done TCL_INC_SPEC="$TCL_INCLUDE_SPEC" if test "x$with_tcllib" != "x" ; then tclconfig="${with_tcllib}/tclConfig.sh" if test -f "$tclconfig" ; then . $tclconfig fi TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}" fi if test "x$with_tclinclude" != "x" ; then TCL_INC_SPEC="-I${with_tclinclude}" fi OSG_INC_SPEC=-I${incdir} OSG_LIB_DIR=${libdir} OSG_LIB_SPEC="-L${libdir}" if test "x$with_osg_includes" != "x"; then OSG_INC_SPEC=-I$with_osg_includes fi if test "x$with_osg_libs" != "x"; then OSG_LIB_DIR=$with_osg_libs OSG_LIB_SPEC="-L$with_osg_libs" fi AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h]) AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h]) AC_CHECK_FUNCS([accept4]) AC_SUBST(STATSDIR) AC_SUBST(TCL_INC_SPEC) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_VERSION) AC_SUBST(OSG_INC_SPEC) AC_SUBST(OSG_LIB_DIR) AC_SUBST(OSG_LIB_SPEC) AC_OUTPUT([Makefile])