AC_PREREQ([2.60]) AC_INIT([vtkvis], [1.8], [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( [vtk-includes], [AS_HELP_STRING([--with-vtk-includes=DIR], [location of versioned VTK include dir])], [with_vtk_includes=$withval], [with_vtk_includes=""]) AC_ARG_WITH( [vtk-libs], [AS_HELP_STRING([--with-vtk-libs=DIR], [VTK libraries are in DIR])], [with_vtk_libs=$withval], [with_vtk_libs=""]) AC_ARG_WITH( [vtk], [AS_HELP_STRING([--with-vtk=VERSION], [Version of VTK required @<:@default=6.1@:>@])], [with_vtk=$withval], [with_vtk=""]) 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 # vtk 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 # We are assuming that we're using VTK 6.0 VTK_VERSION=6.1 VTK_LIB_DIR=${libdir} VTK_INC_DIR=${incdir} if test "x$with_vtk_includes" != "x"; then VTK_INC_DIR=$with_vtk_includes fi if test "x$with_vtk_libs" != "x"; then VTK_LIB_DIR=$with_vtk_libs fi dnl Prefer our VTK installation over systems. --with-vtk overrides. if test "x$with_vtk" != "x" ; then VTK_VERSION=$with_vtk fi if ! test -d "$VTK_INC_DIR/vtk-${VTK_VERSION}" ; then AC_ERROR([Couldn't find VTK includes]) else VTK_INC_SPEC="-I${VTK_INC_DIR}/vtk-${VTK_VERSION}" fi save_CPPFLAGS=$CPPFLAGS CPPFLAGS=$VTK_INC_SPEC AC_CHECK_HEADERS([vtkSmartPointer.h], [], [AC_MSG_WARN([cannot find vtkSmartPointer.h])]) CPPFLAGS=$save_CPPFLAGS 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(VTK_VERSION) AC_SUBST(VTK_INC_DIR) AC_SUBST(VTK_LIB_DIR) AC_OUTPUT([ Doxyfile \ Makefile])