1 | AC_PREREQ([2.60]) |
---|
2 | AC_INIT([pymolproxy], [1.0], [rappture@nanohub.org]) |
---|
3 | AC_CONFIG_AUX_DIR(cf) |
---|
4 | |
---|
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( |
---|
13 | [statsdir], |
---|
14 | [AS_HELP_STRING([--with-statsdir=DIR], |
---|
15 | [Write statistics in DIR])], |
---|
16 | [STATSDIR=$withval], |
---|
17 | [STATSDIR="/var/tmp/visservers"]) |
---|
18 | |
---|
19 | AC_ARG_WITH( |
---|
20 | [logdir], |
---|
21 | [AS_HELP_STRING([--with-logdir=DIR], |
---|
22 | [Write log files in DIR])], |
---|
23 | [LOGDIR=$withval], |
---|
24 | [LOGDIR="/tmp"]) |
---|
25 | |
---|
26 | RP_LANG_PYTHON |
---|
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 | |
---|
39 | if test "x${incdir}" == "x"; then |
---|
40 | incdir=${exec_prefix}/include |
---|
41 | fi |
---|
42 | libdir=${exec_prefix}/lib |
---|
43 | |
---|
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 | |
---|
50 | SC_CONFIG_CFLAGS |
---|
51 | |
---|
52 | AC_PATH_X |
---|
53 | |
---|
54 | AC_PROG_INSTALL |
---|
55 | AC_PROG_RANLIB |
---|
56 | AC_PROG_LN_S |
---|
57 | AC_PROG_MKDIR_P |
---|
58 | |
---|
59 | dnl find and test the C compiler |
---|
60 | AC_PROG_CC |
---|
61 | AC_PROG_CPP |
---|
62 | AC_PROG_CXXCPP |
---|
63 | AC_PROG_CXX |
---|
64 | AC_LANG_CPLUSPLUS |
---|
65 | |
---|
66 | AC_C_BIGENDIAN |
---|
67 | |
---|
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 | |
---|
71 | LD_RPATH=""; |
---|
72 | |
---|
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 | |
---|
82 | TCL_VERSION="8.4" |
---|
83 | for dir in \ |
---|
84 | ${exec_prefix} \ |
---|
85 | ${exec_prefix}/lib ; do |
---|
86 | tclconfig="${dir}/tclConfig.sh" |
---|
87 | if test -f "$tclconfig" ; then |
---|
88 | . $tclconfig |
---|
89 | break |
---|
90 | fi |
---|
91 | done |
---|
92 | TCL_INC_SPEC="$TCL_INCLUDE_SPEC" |
---|
93 | |
---|
94 | if test "x$with_tcllib" != "x" ; then |
---|
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}" |
---|
100 | fi |
---|
101 | if test "x$with_tclinclude" != "x" ; then |
---|
102 | TCL_INC_SPEC="-I${with_tclinclude}" |
---|
103 | fi |
---|
104 | |
---|
105 | AC_CHECK_HEADER([GL/glew.h]) |
---|
106 | |
---|
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 | |
---|
110 | AC_CHECK_FUNCS([accept4]) |
---|
111 | AC_CHECK_FUNCS([mkstemps]) |
---|
112 | |
---|
113 | AC_SUBST(LD_RPATH) |
---|
114 | AC_SUBST(LOGDIR) |
---|
115 | AC_SUBST(STATSDIR) |
---|
116 | AC_SUBST(SUBDIRS) |
---|
117 | AC_SUBST(PYTHON) |
---|
118 | AC_SUBST(TCL_INC_SPEC) |
---|
119 | AC_SUBST(TCL_LIB_SPEC) |
---|
120 | AC_SUBST(TCL_VERSION) |
---|
121 | |
---|
122 | AC_OUTPUT([ |
---|
123 | Makefile]) |
---|