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

Last change on this file since 1278 was 1278, checked in by gah, 15 years ago

vizservers/pymolproxy/pymolproxy.c

Added atomscale and projection commands.
Created buffered input layers between client-proxy, server-proxy.
Also created non-blocking buffered image layer between proxy-client.
This is a major update to the proxy. It should be more efficient.

vizservers/nanoscale/server.c

Removed broadcast feature. It's not being used. The server never
redirects the client to another host.

vizservers/start_viz.sh.in

Fixed sed script to replace the last octet of IP address with
broadcast 255.

vizservers/configure.in

Added test of Cg libraries and includes. Gentoo has moved them
from /usr/lib to /opt/nvidia-cg-toolkit/lib.

vizservers/nanovis/Makefile.in

Added locations of Cg libraries and headers.

File size: 5.6 KB
Line 
1AC_INIT(vizservers, 0.1, rappture@nanohub.org)
2AC_CONFIG_HEADER(nanoscale/config.h)
3
4VERSION=0.0.1
5AC_SUBST(VERSION)
6
7#------------------------------------------------------------------------
8# Handle the --prefix=... option
9#------------------------------------------------------------------------
10
11if test "${prefix}" = "NONE"; then
12    prefix=/usr/local
13fi
14if test "${exec_prefix}" = "NONE"; then
15    exec_prefix=$prefix
16fi
17
18if test "${libdir}" != "${prefix}/lib"; then
19    LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}"
20else
21    LIB_SEARCH_DIRS="-L ${libdir}"
22fi
23
24SC_CONFIG_CFLAGS
25
26AC_SUBST(CFLAGS_DEBUG)
27AC_SUBST(CFLAGS_OPTIMIZE)
28AC_SUBST(STLIB_LD)
29AC_SUBST(SHLIB_LD)
30AC_SUBST(SHLIB_CFLAGS)
31AC_SUBST(SHLIB_LDFLAGS)
32AC_SUBST(SHLIB_SUFFIX)
33
34AC_PROG_INSTALL
35AC_PROG_RANLIB
36AC_PROG_LN_S
37AC_PROG_MKDIR_P
38
39dnl find and test the C compiler
40AC_PROG_CC
41AC_PROG_CPP
42AC_PROG_CXXCPP
43AC_PROG_CXX
44AC_LANG_CPLUSPLUS
45
46AC_C_BIGENDIAN
47
48LD_RPATH="";
49
50SUBDIRS="nanoscale nanovis pymolproxy"
51AC_SUBST(SUBDIRS)
52
53AC_ARG_WITH(
54    [tcllib],
55    [AS_HELP_STRING([--with-tcllib[=DIR]],
56        [location of Tcl binary library libtclstubs.a @<:@default=/usr/lib@:>@])],
57    [with_tcllib=$withval],
58    [with_tcllib=""])
59
60#
61# Need to check for the following dependencies:
62#       Rappture headers and library (done)
63#       Tcl headers and library (done)
64#       GL headers and library
65#       GLuT headers and library
66#       GLui header and library
67#       GLEW header and library
68#       Cg headers and library
69#       CgGL headers and library
70#       pthread library
71#       DX headers and library (done, sort of)
72#
73
74TCL_VERSION="8.4"
75for dir in \
76 ${exec_prefix} \
77 ${exec_prefix}/lib \
78 ${with_rappture} \
79 ${with_rappture}/lib ; do
80  tclconfig="${dir}/tclConfig.sh"
81  if test -f "$tclconfig" ; then
82    . $tclconfig
83    break
84  fi
85done
86TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
87
88if test "x$with_tcllib" != "x" ; then
89   tclconfig="${with_tcllib}/tclConfig.sh"
90   if test -f "$tclconfig" ; then
91    . $tclconfig
92   fi
93   TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}"
94fi
95if test "x$with_tclinclude" != "x" ; then
96   TCL_INC_SPEC="-I${with_tclinclude}"
97fi
98
99AC_SUBST(TCL_VERSION)
100AC_SUBST(TCL_INC_SPEC)
101AC_SUBST(TCL_LIB_SPEC)
102
103AC_ARG_WITH(
104    [rappture],
105    [AS_HELP_STRING([--with-rappture[=DIR]],
106        [location of rappture files lib/librappture2.a and include/rappture2/rappture2.h @<:@default=/usr@:>@])],
107    [with_rappture=$withval],
108    [with_rappture=/usr])
109
110RP2_INCL_DIR=""
111RP_DIR=""
112AC_MSG_CHECKING([for rappture])
113if test "x$with_rappture" != "x" ; then
114    if test "x$with_rappture" != "xprefix" ; then
115        if test -f "$with_rappture"
116        then
117            AC_MSG_RESULT([no])
118            AC_MSG_ERROR([please provide --with-rappture with directory])
119        else
120            if test -d "$with_rappture"
121            then
122                if test -r "$with_rappture/include/rappture2/rappture2.h" -a -r "$with_rappture/lib/librappture2.a"
123                then
124                    RP2_INCL_DIR="$with_rappture/include/rappture2"
125                    RP_DIR="$with_rappture"
126                    AC_MSG_RESULT([yes])
127                else
128                    AC_MSG_RESULT([no])
129                    AC_MSG_ERROR([cannot find rappture2.h and librappture2.a, try using --with-rappture])
130                fi
131            else
132                AC_MSG_RESULT([no])
133                AC_MSG_ERROR([cannot find rappture2.h and librappture2.a inside $with_rappture, try using --with-rappture])
134            fi
135        fi
136    else
137        RP2_INCL_DIR="$prefix/include/rappture2"
138        RP_DIR="$prefix"
139        AC_MSG_RESULT([set to prefix])
140    fi
141else
142    AC_CHECK_HEADERS([rappture.h], [],
143           [AC_MSG_ERROR([cannot find rappture.h, try using --with-rappture])])
144
145
146fi
147AC_MSG_RESULT([${RP_DIR}/include])
148AC_SUBST(RP2_INCL_DIR)
149AC_SUBST(RP_DIR)
150
151AC_CHECK_HEADER([GL/glui.h])
152AC_CHECK_HEADER([glui.h])
153AC_CHECK_HEADER([GL/glut.h])
154AC_CHECK_HEADER([GL/glew.h])
155AC_CHECK_HEADER([Cg/cgGL.h])
156
157AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h])
158AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h])
159
160AC_MSG_CHECKING([for DX installation])
161DX_DIR=""
162for dir in \
163 /apps/rappture \
164 /usr/dx \
165 /usr
166do
167  if test -r "${dir}/include/dx/dx.h" ; then
168    DX_DIR="$dir"
169    break
170  fi
171done
172if test "x${DX_DIR}" = "x" ; then
173  AC_MSG_ERROR([can't find OpenDX installation])
174fi
175
176if test "${DX_DIR}" = "/usr" ; then
177  DX_DIR=""
178else
179  LD_RPATH="$loader_run_path:${DX_DIR}/lib"
180fi
181
182AC_SUBST(DX_DIR)
183AC_MSG_RESULT([${DX_DIR}])
184
185AC_MSG_CHECKING([for nVidia Cg installation])
186CG_DIR=""
187for dir in \
188 /opt/nvidia-cg-toolkit \
189 /usr/cg \
190 /usr
191do
192  if test -r "${dir}/include/Cg/cgGL.h" ; then
193    CG_DIR="$dir"
194    break
195  fi
196done
197if test "x${CG_DIR}" = "x" ; then
198  AC_MSG_ERROR([can't find nVidia Cg installation])
199fi
200
201if test "${CG_DIR}" = "/usr" ; then
202  CG_DIR=""
203else
204  LD_RPATH="$loader_run_path:${CG_DIR}/lib"
205fi
206
207AC_SUBST(CG_DIR)
208AC_MSG_RESULT([${CG_DIR}])
209AC_SUBST(LD_RPATH)
210
211dnl AC_MSG_CHECKING(tcl library version)
212dnl TCL=`AC_TRY_RUN([#include <tcl.h>
213dnl         int main() {printf("tcl%s",TCL_VERSION);return(0);}],,
214dnl         echo "tcl8.4", echo "tcl8.4")`
215dnl AC_MSG_RESULT($TCL)
216dnl AC_MSG_CHECKING(tk library version)
217dnl TK=`AC_TRY_RUN([#include <tk.h>
218dnl         main() {printf("tk%s", TK_VERSION); exit(0);}],,
219dnl         echo "tk8.4", echo "tk8.4")`
220dnl AC_MSG_RESULT($TK)
221
222
223AC_OUTPUT(  Makefile \
224            nanoscale/Makefile \
225            nanovis/Makefile \
226            nanovis/newmat11/Makefile \
227            nanovis/R2/src/Makefile \
228            nanovis/imgLoaders/Makefile \
229            nanovis/transfer-function/Makefile \
230            pymolproxy/Makefile \
231            start_viz.sh    )
Note: See TracBrowser for help on using the repository browser.