AC_PREREQ([2.60]) AC_INIT([nanoscale], [0.1], [rappture@nanohub.org]) AC_CONFIG_AUX_DIR(cf) AC_CONFIG_HEADERS([config.h]) 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( [statsdir], [AS_HELP_STRING([--with-statsdir=DIR], [Write statistics in DIR])], [STATSDIR=$withval], [STATSDIR="/var/tmp/visservers"]) AC_ARG_WITH( [logdir], [AS_HELP_STRING([--with-logdir=DIR], [Write log files in DIR])], [LOGDIR=$withval], [LOGDIR="/tmp"]) #------------------------------------------------------------------------ # 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 SC_CONFIG_CFLAGS AC_PATH_X 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 AC_C_BIGENDIAN # Save the values as shell variables so that we can substitute them # into bltHash.h for situtations where there's no bltInt.h. LD_RPATH=""; # # Need to check for the following dependencies: # Rappture headers and library (done) # Tcl headers and library (done) # GL headers and library # GLEW header and library # pthread library # 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 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_CHECK_FUNCS([mkstemps]) AC_SUBST(LD_RPATH) AC_SUBST(LOGDIR) AC_SUBST(STATSDIR) AC_SUBST(SUBDIRS) AC_SUBST(TCL_INC_SPEC) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_VERSION) AC_OUTPUT([ Makefile \ renderservers.tcl \ start_nanoscale.sh])