1 | AC_PREREQ([2.60]) |
---|
2 | AC_INIT([vizservers], [0.1], [rappture@nanohub.org]) |
---|
3 | AC_CONFIG_AUX_DIR(cf) |
---|
4 | AC_CONFIG_HEADERS([nanoscale/config.h]) |
---|
5 | |
---|
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( |
---|
14 | [statsdir], |
---|
15 | [AS_HELP_STRING([--with-statsdir=DIR], |
---|
16 | [Write statistics in DIR])], |
---|
17 | [STATSDIR=$withval], |
---|
18 | [STATSDIR="/var/tmp/visservers"]) |
---|
19 | |
---|
20 | AC_ARG_WITH( |
---|
21 | [logdir], |
---|
22 | [AS_HELP_STRING([--with-logdir=DIR], |
---|
23 | [Write log files in DIR])], |
---|
24 | [LOGDIR=$withval], |
---|
25 | [LOGDIR="/tmp"]) |
---|
26 | |
---|
27 | RP_LANG_PYTHON |
---|
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 | |
---|
40 | if test "x${incdir}" == "x"; then |
---|
41 | incdir=${exec_prefix}/include |
---|
42 | fi |
---|
43 | libdir=${exec_prefix}/lib |
---|
44 | |
---|
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 | |
---|
51 | SC_CONFIG_CFLAGS |
---|
52 | |
---|
53 | AC_PATH_X |
---|
54 | |
---|
55 | AC_PROG_INSTALL |
---|
56 | AC_PROG_RANLIB |
---|
57 | AC_PROG_LN_S |
---|
58 | AC_PROG_MKDIR_P |
---|
59 | |
---|
60 | dnl find and test the C compiler |
---|
61 | AC_PROG_CC |
---|
62 | AC_PROG_CPP |
---|
63 | AC_PROG_CXXCPP |
---|
64 | AC_PROG_CXX |
---|
65 | AC_LANG_CPLUSPLUS |
---|
66 | |
---|
67 | AC_C_BIGENDIAN |
---|
68 | |
---|
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 | |
---|
72 | LD_RPATH=""; |
---|
73 | |
---|
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 | # GLuT headers and library |
---|
80 | # GLEW header and library |
---|
81 | # Cg headers and library |
---|
82 | # CgGL headers and library |
---|
83 | # pthread library |
---|
84 | # |
---|
85 | |
---|
86 | TCL_VERSION="8.4" |
---|
87 | for dir in \ |
---|
88 | ${exec_prefix} \ |
---|
89 | ${exec_prefix}/lib ; do |
---|
90 | tclconfig="${dir}/tclConfig.sh" |
---|
91 | if test -f "$tclconfig" ; then |
---|
92 | . $tclconfig |
---|
93 | break |
---|
94 | fi |
---|
95 | done |
---|
96 | TCL_INC_SPEC="$TCL_INCLUDE_SPEC" |
---|
97 | |
---|
98 | if test "x$with_tcllib" != "x" ; then |
---|
99 | tclconfig="${with_tcllib}/tclConfig.sh" |
---|
100 | if test -f "$tclconfig" ; then |
---|
101 | . $tclconfig |
---|
102 | fi |
---|
103 | TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}" |
---|
104 | fi |
---|
105 | if test "x$with_tclinclude" != "x" ; then |
---|
106 | TCL_INC_SPEC="-I${with_tclinclude}" |
---|
107 | fi |
---|
108 | |
---|
109 | AC_CHECK_HEADER([GL/glew.h]) |
---|
110 | |
---|
111 | AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h]) |
---|
112 | AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h]) |
---|
113 | |
---|
114 | AC_CHECK_FUNCS([accept4]) |
---|
115 | AC_CHECK_FUNCS([mkstemps]) |
---|
116 | |
---|
117 | SUBDIRS="nanoscale pymolproxy" |
---|
118 | |
---|
119 | AC_SUBST(LD_RPATH) |
---|
120 | AC_SUBST(LOGDIR) |
---|
121 | AC_SUBST(STATSDIR) |
---|
122 | AC_SUBST(SUBDIRS) |
---|
123 | AC_SUBST(PYTHON) |
---|
124 | AC_SUBST(TCL_INC_SPEC) |
---|
125 | AC_SUBST(TCL_LIB_SPEC) |
---|
126 | AC_SUBST(TCL_VERSION) |
---|
127 | |
---|
128 | AC_OUTPUT([ |
---|
129 | Makefile \ |
---|
130 | nanoscale/Makefile \ |
---|
131 | nanoscale/renderservers.tcl \ |
---|
132 | pymolproxy/Makefile \ |
---|
133 | start_nanoscale.sh]) |
---|