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

Last change on this file since 1304 was 1282, checked in by dkearney, 16 years ago

adding jwire test script
adding Rappture AVTranslate object as a way to turn a series of rgb data into an mpeg movie
i hate tabs in code
added AVTranslate object to flow capture command
updated flow commands to use Rappture::CmdSpec? for parsing commands

File size: 6.1 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#       ffmpeg headers and library (started)
73#
74
75TCL_VERSION="8.4"
76for dir in \
77 ${exec_prefix} \
78 ${exec_prefix}/lib \
79 ${with_rappture} \
80 ${with_rappture}/lib ; do
81  tclconfig="${dir}/tclConfig.sh"
82  if test -f "$tclconfig" ; then
83    . $tclconfig
84    break
85  fi
86done
87TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
88
89if test "x$with_tcllib" != "x" ; then
90   tclconfig="${with_tcllib}/tclConfig.sh"
91   if test -f "$tclconfig" ; then
92    . $tclconfig
93   fi
94   TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}"
95fi
96if test "x$with_tclinclude" != "x" ; then
97   TCL_INC_SPEC="-I${with_tclinclude}"
98fi
99
100AC_SUBST(TCL_VERSION)
101AC_SUBST(TCL_INC_SPEC)
102AC_SUBST(TCL_LIB_SPEC)
103
104AC_ARG_WITH(
105    [rappture],
106    [AS_HELP_STRING([--with-rappture[=DIR]],
107        [location of rappture files lib/librappture2.a and include/rappture2/rappture2.h @<:@default=/usr@:>@])],
108    [with_rappture=$withval],
109    [with_rappture=/usr])
110
111RP2_INCL_DIR=""
112RP_DIR=""
113AC_MSG_CHECKING([for rappture])
114if test "x$with_rappture" != "x" ; then
115    if test "x$with_rappture" != "xprefix" ; then
116        if test -f "$with_rappture"
117        then
118            AC_MSG_RESULT([no])
119            AC_MSG_ERROR([please provide --with-rappture with directory])
120        else
121            if test -d "$with_rappture"
122            then
123                if test -r "$with_rappture/include/rappture2/rappture2.h" -a -r "$with_rappture/lib/librappture2.a"
124                then
125                    RP2_INCL_DIR="$with_rappture/include/rappture2"
126                    RP_DIR="$with_rappture"
127                    AC_MSG_RESULT([yes])
128                else
129                    AC_MSG_RESULT([no])
130                    AC_MSG_ERROR([cannot find rappture2.h and librappture2.a, try using --with-rappture])
131                fi
132            else
133                AC_MSG_RESULT([no])
134                AC_MSG_ERROR([cannot find rappture2.h and librappture2.a inside $with_rappture, try using --with-rappture])
135            fi
136        fi
137    else
138        RP2_INCL_DIR="$prefix/include/rappture2"
139        RP_DIR="$prefix"
140        AC_MSG_RESULT([set to prefix])
141    fi
142else
143    AC_CHECK_HEADERS([rappture.h], [],
144           [AC_MSG_ERROR([cannot find rappture.h, try using --with-rappture])])
145
146
147fi
148AC_MSG_RESULT([${RP_DIR}/include])
149AC_SUBST(RP2_INCL_DIR)
150AC_SUBST(RP_DIR)
151
152AC_CHECK_HEADER([GL/glui.h])
153AC_CHECK_HEADER([glui.h])
154AC_CHECK_HEADER([GL/glut.h])
155AC_CHECK_HEADER([GL/glew.h])
156AC_CHECK_HEADER([Cg/cgGL.h])
157
158AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h])
159AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h])
160
161AC_MSG_CHECKING([for DX installation])
162DX_DIR=""
163for dir in \
164 /apps/rappture \
165 /usr/dx \
166 /usr
167do
168  if test -r "${dir}/include/dx/dx.h" ; then
169    DX_DIR="$dir"
170    break
171  fi
172done
173if test "x${DX_DIR}" = "x" ; then
174  AC_MSG_ERROR([can't find OpenDX installation])
175fi
176
177if test "${DX_DIR}" = "/usr" ; then
178  DX_DIR=""
179else
180  LD_RPATH="$loader_run_path:${DX_DIR}/lib"
181fi
182
183AC_SUBST(DX_DIR)
184AC_MSG_RESULT([${DX_DIR}])
185
186AC_MSG_CHECKING([for FFmpeg installation])
187FFMPEG_DIR=""
188for dir in \
189 /apps/rappture \
190 /usr
191do
192  if test -r "${dir}/include/ffmpeg/avcodec.h" ; then
193    FFMPEG_DIR="$dir"
194    break
195  fi
196done
197if test "x${FFMPEG_DIR}" = "x" ; then
198  AC_MSG_ERROR([can't find FFmpeg installation])
199fi
200
201if test "${FFMPEG_DIR}" = "/usr" ; then
202  FFMPEG_DIR=""
203#else
204#  LD_RPATH="$loader_run_path:${FFMPEG_DIR}/lib"
205fi
206
207AC_SUBST(FFMPEG_DIR)
208AC_MSG_RESULT([${FFMPEG_DIR}])
209
210AC_MSG_CHECKING([for nVidia Cg installation])
211CG_DIR=""
212for dir in \
213 /opt/nvidia-cg-toolkit \
214 /usr/cg \
215 /usr
216do
217  if test -r "${dir}/include/Cg/cgGL.h" ; then
218    CG_DIR="$dir"
219    break
220  fi
221done
222if test "x${CG_DIR}" = "x" ; then
223  AC_MSG_ERROR([can't find nVidia Cg installation])
224fi
225
226if test "${CG_DIR}" = "/usr" ; then
227  CG_DIR=""
228else
229  LD_RPATH="$loader_run_path:${CG_DIR}/lib"
230fi
231
232AC_SUBST(CG_DIR)
233AC_MSG_RESULT([${CG_DIR}])
234AC_SUBST(LD_RPATH)
235
236dnl AC_MSG_CHECKING(tcl library version)
237dnl TCL=`AC_TRY_RUN([#include <tcl.h>
238dnl         int main() {printf("tcl%s",TCL_VERSION);return(0);}],,
239dnl         echo "tcl8.4", echo "tcl8.4")`
240dnl AC_MSG_RESULT($TCL)
241dnl AC_MSG_CHECKING(tk library version)
242dnl TK=`AC_TRY_RUN([#include <tk.h>
243dnl         main() {printf("tk%s", TK_VERSION); exit(0);}],,
244dnl         echo "tk8.4", echo "tk8.4")`
245dnl AC_MSG_RESULT($TK)
246
247
248AC_OUTPUT(  Makefile \
249            nanoscale/Makefile \
250            nanovis/Makefile \
251            nanovis/newmat11/Makefile \
252            nanovis/R2/src/Makefile \
253            nanovis/imgLoaders/Makefile \
254            nanovis/transfer-function/Makefile \
255            pymolproxy/Makefile \
256            start_viz.sh    )
Note: See TracBrowser for help on using the repository browser.