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