source: trunk/packages/vizservers/configure.in @ 4308

Last change on this file since 4308 was 4109, checked in by ldelgass, 11 years ago

Rename configure option to --with-logdir (instead of logsdir)

File size: 2.9 KB
Line 
1AC_PREREQ([2.60])
2AC_INIT([vizservers], [0.1], [rappture@nanohub.org])
3AC_CONFIG_AUX_DIR(cf)
4AC_CONFIG_HEADERS([nanoscale/config.h])
5
6AC_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
13AC_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
20AC_ARG_WITH(
21    [logdir],
22    [AS_HELP_STRING([--with-logdir=DIR],
23        [Write log files in DIR])],
24    [LOGDIR=$withval],
25    [LOGDIR="/tmp"])
26
27RP_LANG_PYTHON
28
29#------------------------------------------------------------------------
30# Handle the --prefix=... option
31#------------------------------------------------------------------------
32
33if test "${prefix}" = "NONE"; then
34    prefix=/usr/local
35fi
36if test "${exec_prefix}" = "NONE"; then
37    exec_prefix=$prefix
38fi
39
40if test "x${incdir}" == "x"; then
41  incdir=${exec_prefix}/include
42fi
43libdir=${exec_prefix}/lib
44
45if test "${libdir}" != "${prefix}/lib"; then
46    LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}"
47else
48    LIB_SEARCH_DIRS="-L ${libdir}"
49fi
50
51SC_CONFIG_CFLAGS
52
53AC_PATH_X
54
55AC_PROG_INSTALL
56AC_PROG_RANLIB
57AC_PROG_LN_S
58AC_PROG_MKDIR_P
59
60dnl find and test the C compiler
61AC_PROG_CC
62AC_PROG_CPP
63AC_PROG_CXXCPP
64AC_PROG_CXX
65AC_LANG_CPLUSPLUS
66
67AC_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
72LD_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
86TCL_VERSION="8.4"
87for 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
95done
96TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
97
98if 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}"
104fi
105if test "x$with_tclinclude" != "x" ; then
106   TCL_INC_SPEC="-I${with_tclinclude}"
107fi
108
109AC_CHECK_HEADER([GL/glew.h])
110
111AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h])
112AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h])
113
114AC_CHECK_FUNCS([accept4])
115AC_CHECK_FUNCS([mkstemps])
116
117SUBDIRS="nanoscale pymolproxy"
118
119AC_SUBST(LD_RPATH)
120AC_SUBST(LOGDIR)
121AC_SUBST(STATSDIR)
122AC_SUBST(SUBDIRS)
123AC_SUBST(PYTHON)
124AC_SUBST(TCL_INC_SPEC)
125AC_SUBST(TCL_LIB_SPEC)
126AC_SUBST(TCL_VERSION)
127
128AC_OUTPUT([
129   Makefile \
130   nanoscale/Makefile \
131   nanoscale/renderservers.tcl \
132   pymolproxy/Makefile \
133   start_nanoscale.sh])
Note: See TracBrowser for help on using the repository browser.