Changeset 2198 for trunk/packages/vizservers/configure.in
- Timestamp:
- Apr 8, 2011, 10:47:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/configure.in
r2111 r2198 2 2 AC_INIT(vizservers, 0.1, rappture@nanohub.org) 3 3 AC_CONFIG_HEADER(nanovis/nvconf.h nanoscale/config.h) 4 5 with_vtk="yes" 6 with_vtk_libs="" 7 with_vtk_includes="" 8 with_rappture="" 9 with_tcllib="" 10 with_rappture="yes" 4 11 5 12 AC_ARG_WITH( … … 13 20 [rappture], 14 21 [AS_HELP_STRING([--with-rappture[=DIR]], 15 [location of rappture files lib/librappture 2.a and include/rappture2/rappture2.h @<:@default=/usr@:>@])],22 [location of rappture files lib/librappture.a and include/rappture.h @<:@default=/usr@:>@])], 16 23 [with_rappture=$withval], 17 [with_rappture= /usr])24 [with_rappture=yes]) 18 25 19 26 AC_ARG_WITH( … … 31 38 [with_vtk_libs=/usr/lib/vtk-5.6]) 32 39 40 AC_ARG_WITH( 41 [vtk], 42 [AS_HELP_STRING([--with-vtk=VERSION], 43 [Version of VTK required])], 44 [with_vtk=$withval], 45 [with_vtk=yes]) 46 33 47 VERSION=0.0.1 34 AC_SUBST(VERSION)35 48 36 49 #------------------------------------------------------------------------ … … 44 57 exec_prefix=$prefix 45 58 fi 59 60 if test "x${incdir}" == "x"; then 61 incdir=${exec_prefix}/include 62 fi 63 libdir=${exec_prefix}/lib 46 64 47 65 if test "${libdir}" != "${prefix}/lib"; then … … 53 71 SC_CONFIG_CFLAGS 54 72 55 AC_SUBST(CFLAGS_DEBUG)56 AC_SUBST(CFLAGS_OPTIMIZE)57 AC_SUBST(STLIB_LD)58 AC_SUBST(SHLIB_LD)59 AC_SUBST(SHLIB_CFLAGS)60 AC_SUBST(SHLIB_LDFLAGS)61 AC_SUBST(SHLIB_SUFFIX)62 73 63 74 AC_PATH_X … … 85 96 # into bltHash.h for situtations where there's no bltInt.h. 86 97 87 AC_SUBST(SIZEOF_INT, ${ac_cv_sizeof_int})88 AC_SUBST(SIZEOF_LONG, ${ac_cv_sizeof_long})89 AC_SUBST(SIZEOF_LONG_LONG, ${ac_cv_sizeof_long_long})90 AC_SUBST(SIZEOF_VOID_P, ${ac_cv_sizeof_void_p})91 AC_SUBST(SIZEOF_FLOAT, ${ac_cv_sizeof_float})92 98 93 99 LD_RPATH=""; 94 95 SUBDIRS="nanoscale nanovis pymolproxy vtkvis"96 AC_SUBST(SUBDIRS)97 100 98 101 # … … 136 139 fi 137 140 138 AC_SUBST(TCL_VERSION)139 AC_SUBST(TCL_INC_SPEC)140 AC_SUBST(TCL_LIB_SPEC)141 142 141 RP2_INCL_DIR="" 143 142 RP_DIR="" 144 143 AC_MSG_CHECKING([for rappture]) 145 if test "x$with_rappture" != "x" ; then 146 if test "x$with_rappture" != "xprefix" ; then 147 if test -f "$with_rappture" 148 then 149 AC_MSG_RESULT([no]) 150 AC_MSG_ERROR([please provide --with-rappture with directory]) 151 else 152 if test -d "$with_rappture" 153 then 154 if test -r "$with_rappture/include/rappture2/rappture2.h" -a -r "$with_rappture/lib/librappture2.a" 155 then 156 RP2_INCL_DIR="$with_rappture/include/rappture2" 157 RP_DIR="$with_rappture" 158 AC_MSG_RESULT([yes]) 159 else 160 AC_MSG_RESULT([no]) 161 AC_MSG_ERROR([cannot find rappture2.h and librappture2.a, try using --with-rappture]) 162 fi 163 else 164 AC_MSG_RESULT([no]) 165 AC_MSG_ERROR([cannot find rappture2.h and librappture2.a inside $with_rappture, try using --with-rappture]) 166 fi 167 fi 168 else 169 RP2_INCL_DIR="$prefix/include/rappture2" 170 RP_DIR="$prefix" 171 AC_MSG_RESULT([set to prefix]) 144 if test "$with_rappture" == "yes" ; then 145 for dir in "$exec_prefix" "/usr" ; do 146 if test -r "$dir/include/rappture2/rappture2.h" -a \ 147 -r "$dir/lib/librappture.a"; then 148 RP_INCL_SPEC="-I$dir/include" 149 RP_DIR="$dir" 150 RP_LIB_DIR="$dir/lib" 151 AC_MSG_RESULT([$dir]) 152 break 172 153 fi 154 done 173 155 else 174 AC_CHECK_HEADERS([rappture.h], [], 175 [AC_MSG_ERROR([cannot find rappture.h, try using --with-rappture])]) 176 177 178 fi 179 AC_MSG_RESULT([${RP_DIR}/include]) 180 AC_SUBST(RP2_INCL_DIR) 181 AC_SUBST(RP_DIR) 156 if test -d "$with_rappture" ; then 157 AC_MSG_ERROR([--with-rappture: no such directory $with_rappture]) 158 fi 159 RP_LIB=$with_rappture 160 RP_INCL_SPEC="-I$with_rappture/include" 161 RP_LIB_DIR="$with_rappture/lib" 162 fi 163 if test "x${RP_DIR}" = "x" ; then 164 AC_MSG_ERROR([cannot find rappture.h and librappture2.a, try using --with-rappture]) 165 else 166 AC_MSG_RESULT([$with_rappture]) 167 fi 168 169 dnl Prefer our VTK installation over systems. --with-vtk overrides. 170 if test "$with_vtk" != "no" ; then 171 if test "$with_vtk" = "yes" ; then 172 for dir in vtk-5.{9,8,7,6,5,4,3,2,1} ; do 173 if test -d "${libdir}/$dir" -a -d "${incdir}/$dir"; then 174 VTK_LIB_SPEC="-L${libdir}/$dir" 175 VTK_LIB_DIR="${libdir}/$dir" 176 VTK_INC_SPEC="-I${incdir}/$dir" 177 break 178 fi 179 if test -d "/usr/lib/$dir" -a -d "/usr/include/$dir"; then 180 VTK_LIB_SPEC=-L/usr/lib/$dir 181 VTK_LIB_DIR=/usr/lib/$dir 182 VTK_INC_SPEC=-I/usr/include/$dir 183 break 184 fi 185 done 186 fi 187 fi 182 188 183 189 if test "x$with_vtk_includes" != "x"; then 184 190 VTK_INC_SPEC=-I$with_vtk_includes 191 fi 192 193 if test "x$with_vtk_libs" != "x"; then 194 VTK_LIB_DIR=$with_vtk_libs 185 195 fi 186 196 … … 190 200 CPPFLAGS=$save_CPPFLAGS 191 201 192 if test "x$with_vtk_libs" != "x"; then193 VTK_LIB_DIR=$with_vtk_libs194 fi195 196 AC_SUBST(VTK_INC_SPEC)197 AC_SUBST(VTK_LIB_DIR)198 199 202 AC_CHECK_HEADER([GL/glui.h]) 200 203 AC_CHECK_HEADER([glui.h]) 201 204 AC_CHECK_HEADER([GL/glut.h]) 202 205 AC_CHECK_HEADER([GL/glew.h]) 203 AC_CHECK_HEADER([Cg/cgGL.h])204 206 205 207 AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h]) … … 219 221 done 220 222 if test "x${DX_INC_DIR}" = "x" ; then 221 AC_MSG_ERROR([can 't find OpenDX include files])223 AC_MSG_ERROR([cannot find OpenDX include files]) 222 224 fi 223 225 … … 227 229 DX_INC_SPEC="-I{DX_INC_DIR}" 228 230 fi 229 AC_SUBST(DX_INC_SPEC)230 231 AC_MSG_RESULT([${DX_INC_DIR}]) 231 232 … … 251 252 done 252 253 if test "x{$DX_LIB_DIR}" = "x" ; then 253 AC_MSG_ERROR([can t find OpenDX libraries])254 AC_MSG_ERROR([cannot find OpenDX libraries]) 254 255 fi 255 256 … … 261 262 fi 262 263 AC_MSG_RESULT([$DX_LIB_SPEC]) 263 AC_SUBST(DX_LIB_SPEC)264 264 265 265 AC_CHECK_HEADERS([opencv/cv.h opencv/highgui.h]) … … 272 272 FF_INC_SPEC="-I/usr/include/ffmpeg" 273 273 fi 274 AC_SUBST(FF_INC_SPEC)275 274 276 275 AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h],,,[ … … 294 293 AC_CHECK_FUNCS([img_convert]) 295 294 295 296 296 AC_MSG_CHECKING([for nVidia Cg installation]) 297 297 CG_DIR="" … … 301 301 /usr 302 302 do 303 if test -r "$ {dir}/include/Cg/cgGL.h" ; then304 CG_DIR= "$dir"303 if test -r "$dir/include" ; then 304 CG_DIR=$dir 305 305 break 306 306 fi 307 307 done 308 if test "x${CG_DIR}" = "x" ; then 309 AC_MSG_ERROR([can't find nVidia Cg installation]) 310 fi 311 312 if test "${CG_DIR}" = "/usr" ; then 308 AC_MSG_RESULT([${CG_DIR}]) 309 310 CG_INC_DIR="$dir/include" 311 CG_LIB_DIR="$dir/lib" 312 313 echo CGDIR=$CG_DIR 314 save_CPPFLAGS=$CPPFLAGS 315 CPPFLAGS="-I${CG_INC_DIR} $CPPFLAGS" 316 AC_CHECK_HEADERS([Cg/cgGL.h], [], AC_MSG_ERROR([cannot find nVidia Cg headers])) 317 CPPFLAGS=$save_CPPFLAGS 318 319 if test "${CG_DIR}" = "/usr" ; then 313 320 CG_DIR="" 314 321 else 315 LD_RPATH="$loader_run_path:${CG_DIR}/lib" 316 fi 317 322 LD_RPATH="$loader_run_path:${CG_LIB_DIR}" 323 fi 324 325 SUBDIRS="nanoscale nanovis pymolproxy vtkvis" 326 327 AC_SUBST(CFLAGS_DEBUG) 328 AC_SUBST(CFLAGS_OPTIMIZE) 318 329 AC_SUBST(CG_DIR) 319 AC_MSG_RESULT([${CG_DIR}]) 330 AC_SUBST(CG_INC_DIR) 331 AC_SUBST(CG_LIB_DIR) 332 AC_SUBST(DX_INC_SPEC) 333 AC_SUBST(DX_LIB_SPEC) 334 AC_SUBST(FF_INC_SPEC) 320 335 AC_SUBST(LD_RPATH) 321 322 dnl AC_MSG_CHECKING(tcl library version) 323 dnl TCL=`AC_TRY_RUN([#include <tcl.h> 324 dnl int main() {printf("tcl%s",TCL_VERSION);return(0);}],, 325 dnl echo "tcl8.4", echo "tcl8.4")` 326 dnl AC_MSG_RESULT($TCL) 327 dnl AC_MSG_CHECKING(tk library version) 328 dnl TK=`AC_TRY_RUN([#include <tk.h> 329 dnl main() {printf("tk%s", TK_VERSION); exit(0);}],, 330 dnl echo "tk8.4", echo "tk8.4")` 331 dnl AC_MSG_RESULT($TK) 332 333 334 AC_OUTPUT( Makefile \ 335 nanoscale/Makefile \ 336 nanovis/Makefile \ 337 nanovis/newmat11/Makefile \ 338 nanovis/R2/src/Makefile \ 339 nanovis/vrutil/Makefile \ 340 nanovis/vrmath/Makefile \ 341 nanovis/vr3d/Makefile \ 342 nanovis/imgLoaders/Makefile \ 343 nanovis/transfer-function/Makefile \ 344 pymolproxy/Makefile \ 345 vtkvis/Doxyfile \ 346 vtkvis/Makefile \ 347 start_viz.sh ) 336 AC_SUBST(RP_DIR) 337 AC_SUBST(RP_INC_SPEC) 338 AC_SUBST(RP_LIB_DIR) 339 AC_SUBST(SHLIB_CFLAGS) 340 AC_SUBST(SHLIB_LD) 341 AC_SUBST(SHLIB_LDFLAGS) 342 AC_SUBST(SHLIB_SUFFIX) 343 AC_SUBST(SIZEOF_FLOAT) 344 AC_SUBST(SIZEOF_INT) 345 AC_SUBST(SIZEOF_LONG) 346 AC_SUBST(SIZEOF_LONG_LONG) 347 AC_SUBST(SIZEOF_VOID_P) 348 AC_SUBST(STLIB_LD) 349 AC_SUBST(SUBDIRS) 350 AC_SUBST(TCL_INC_SPEC) 351 AC_SUBST(TCL_LIB_SPEC) 352 AC_SUBST(TCL_VERSION) 353 AC_SUBST(VERSION) 354 AC_SUBST(VTK_INC_SPEC) 355 AC_SUBST(VTK_LIB_DIR) 356 357 AC_OUTPUT([ 358 Makefile \ 359 nanoscale/Makefile \ 360 nanovis/Makefile \ 361 nanovis/newmat11/Makefile \ 362 nanovis/R2/src/Makefile \ 363 nanovis/vrutil/Makefile \ 364 nanovis/vrmath/Makefile \ 365 nanovis/vr3d/Makefile \ 366 nanovis/imgLoaders/Makefile \ 367 nanovis/transfer-function/Makefile \ 368 pymolproxy/Makefile \ 369 vtkvis/Doxyfile \ 370 vtkvis/Makefile \ 371 start_viz.sh]) 372
Note: See TracChangeset
for help on using the changeset viewer.