[2101] | 1 | AC_PREREQ([2.60]) |
---|
[4060] | 2 | AC_INIT([vizservers], [0.1], [rappture@nanohub.org]) |
---|
[2618] | 3 | AC_CONFIG_AUX_DIR(cf) |
---|
[4060] | 4 | AC_CONFIG_HEADERS([nanoscale/config.h]) |
---|
[749] | 5 | |
---|
[2090] | 6 | AC_ARG_WITH( |
---|
| 7 | [tcllib], |
---|
| 8 | [AS_HELP_STRING([--with-tcllib[=DIR]], |
---|
| 9 | [location of Tcl binary library libtclstubs.a @<:@default=/usr/lib@:>@])], |
---|
| 10 | [with_tcllib=$withval], |
---|
| 11 | [with_tcllib=""]) |
---|
| 12 | |
---|
| 13 | AC_ARG_WITH( |
---|
[3403] | 14 | [statsdir], |
---|
| 15 | [AS_HELP_STRING([--with-statsdir=DIR], |
---|
[4024] | 16 | [Write statistics in DIR])], |
---|
[3403] | 17 | [STATSDIR=$withval], |
---|
| 18 | [STATSDIR="/var/tmp/visservers"]) |
---|
| 19 | |
---|
[4108] | 20 | AC_ARG_WITH( |
---|
[4109] | 21 | [logdir], |
---|
| 22 | [AS_HELP_STRING([--with-logdir=DIR], |
---|
[4108] | 23 | [Write log files in DIR])], |
---|
| 24 | [LOGDIR=$withval], |
---|
| 25 | [LOGDIR="/tmp"]) |
---|
| 26 | |
---|
[4060] | 27 | RP_LANG_PYTHON |
---|
[749] | 28 | |
---|
| 29 | #------------------------------------------------------------------------ |
---|
| 30 | # Handle the --prefix=... option |
---|
| 31 | #------------------------------------------------------------------------ |
---|
| 32 | |
---|
| 33 | if test "${prefix}" = "NONE"; then |
---|
| 34 | prefix=/usr/local |
---|
| 35 | fi |
---|
| 36 | if test "${exec_prefix}" = "NONE"; then |
---|
| 37 | exec_prefix=$prefix |
---|
| 38 | fi |
---|
| 39 | |
---|
[2198] | 40 | if test "x${incdir}" == "x"; then |
---|
| 41 | incdir=${exec_prefix}/include |
---|
| 42 | fi |
---|
| 43 | libdir=${exec_prefix}/lib |
---|
| 44 | |
---|
[749] | 45 | if test "${libdir}" != "${prefix}/lib"; then |
---|
| 46 | LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}" |
---|
| 47 | else |
---|
| 48 | LIB_SEARCH_DIRS="-L ${libdir}" |
---|
| 49 | fi |
---|
| 50 | |
---|
[1113] | 51 | SC_CONFIG_CFLAGS |
---|
[749] | 52 | |
---|
[2073] | 53 | AC_PATH_X |
---|
| 54 | |
---|
[749] | 55 | AC_PROG_INSTALL |
---|
[1111] | 56 | AC_PROG_RANLIB |
---|
| 57 | AC_PROG_LN_S |
---|
| 58 | AC_PROG_MKDIR_P |
---|
[749] | 59 | |
---|
| 60 | dnl find and test the C compiler |
---|
| 61 | AC_PROG_CC |
---|
[1113] | 62 | AC_PROG_CPP |
---|
| 63 | AC_PROG_CXXCPP |
---|
[749] | 64 | AC_PROG_CXX |
---|
| 65 | AC_LANG_CPLUSPLUS |
---|
| 66 | |
---|
[940] | 67 | AC_C_BIGENDIAN |
---|
| 68 | |
---|
[1899] | 69 | # Save the values as shell variables so that we can substitute them |
---|
| 70 | # into bltHash.h for situtations where there's no bltInt.h. |
---|
| 71 | |
---|
[1278] | 72 | LD_RPATH=""; |
---|
| 73 | |
---|
[948] | 74 | # |
---|
| 75 | # Need to check for the following dependencies: |
---|
| 76 | # Rappture headers and library (done) |
---|
| 77 | # Tcl headers and library (done) |
---|
| 78 | # GL headers and library |
---|
| 79 | # GLEW header and library |
---|
| 80 | # pthread library |
---|
| 81 | # |
---|
| 82 | |
---|
[1114] | 83 | TCL_VERSION="8.4" |
---|
| 84 | for dir in \ |
---|
| 85 | ${exec_prefix} \ |
---|
[4060] | 86 | ${exec_prefix}/lib ; do |
---|
[1114] | 87 | tclconfig="${dir}/tclConfig.sh" |
---|
| 88 | if test -f "$tclconfig" ; then |
---|
[1113] | 89 | . $tclconfig |
---|
| 90 | break |
---|
| 91 | fi |
---|
| 92 | done |
---|
[1114] | 93 | TCL_INC_SPEC="$TCL_INCLUDE_SPEC" |
---|
[1113] | 94 | |
---|
[749] | 95 | if test "x$with_tcllib" != "x" ; then |
---|
[1114] | 96 | tclconfig="${with_tcllib}/tclConfig.sh" |
---|
| 97 | if test -f "$tclconfig" ; then |
---|
| 98 | . $tclconfig |
---|
| 99 | fi |
---|
| 100 | TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}" |
---|
[749] | 101 | fi |
---|
| 102 | if test "x$with_tclinclude" != "x" ; then |
---|
[1114] | 103 | TCL_INC_SPEC="-I${with_tclinclude}" |
---|
[749] | 104 | fi |
---|
| 105 | |
---|
[1120] | 106 | AC_CHECK_HEADER([GL/glew.h]) |
---|
[944] | 107 | |
---|
[1115] | 108 | AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h]) |
---|
| 109 | AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h]) |
---|
| 110 | |
---|
[2567] | 111 | AC_CHECK_FUNCS([accept4]) |
---|
[4108] | 112 | AC_CHECK_FUNCS([mkstemps]) |
---|
[2567] | 113 | |
---|
[4060] | 114 | SUBDIRS="nanoscale pymolproxy" |
---|
[2090] | 115 | |
---|
[1278] | 116 | AC_SUBST(LD_RPATH) |
---|
[4108] | 117 | AC_SUBST(LOGDIR) |
---|
[3403] | 118 | AC_SUBST(STATSDIR) |
---|
[2198] | 119 | AC_SUBST(SUBDIRS) |
---|
[2618] | 120 | AC_SUBST(PYTHON) |
---|
[2198] | 121 | AC_SUBST(TCL_INC_SPEC) |
---|
| 122 | AC_SUBST(TCL_LIB_SPEC) |
---|
| 123 | AC_SUBST(TCL_VERSION) |
---|
[1278] | 124 | |
---|
[2198] | 125 | AC_OUTPUT([ |
---|
[2350] | 126 | Makefile \ |
---|
[2198] | 127 | nanoscale/Makefile \ |
---|
[2348] | 128 | nanoscale/renderservers.tcl \ |
---|
[2198] | 129 | pymolproxy/Makefile \ |
---|
[2346] | 130 | start_nanoscale.sh]) |
---|