Ignore:
Timestamp:
Nov 15, 2013, 4:06:52 AM (6 years ago)
Author:
ldelgass
Message:

Add separate configure scripts for nanovis and vtkvis, remove them from the
vizservers configure (which now only configures nanoscale and pymolproxy).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/configure.in

    r4049 r4060  
    11AC_PREREQ([2.60])
    2 AC_INIT(vizservers, 0.1, rappture@nanohub.org)
     2AC_INIT([vizservers], [0.1], [rappture@nanohub.org])
    33AC_CONFIG_AUX_DIR(cf)
    4 AC_CONFIG_HEADERS([nanovis/nvconf.h nanoscale/config.h])
     4AC_CONFIG_HEADERS([nanoscale/config.h])
    55
    66AC_ARG_WITH(
     
    1212
    1313AC_ARG_WITH(
    14     [rappture],
    15     [AS_HELP_STRING([--with-rappture[=DIR]],
    16         [location of rappture files lib/librappture.a and include/rappture.h @<:@default=/usr@:>@])],
    17     [with_rappture=$withval],
    18     [with_rappture=yes])
    19 
    20 AC_ARG_WITH(
    21     [vtk-includes],
    22     [AS_HELP_STRING([--with-vtk-includes=DIR],
    23         [VTK include files are in DIR])],
    24     [with_vtk_includes=$withval],
    25     [with_vtk_includes=""])
    26 
    27 AC_ARG_WITH(
    28     [vtk-libs],
    29     [AS_HELP_STRING([--with-vtk-libs=DIR],
    30         [VTK libraries are in DIR])],
    31     [with_vtk_libs=$withval],
    32     [with_vtk_libs=""])
    33 
    34 AC_ARG_WITH(
    35     [vtk],
    36     [AS_HELP_STRING([--with-vtk=VERSION],
    37         [Version of VTK required])],
    38     [with_vtk=$withval],
    39     [with_vtk=yes])
    40 
    41 AC_ARG_WITH(
    42     [ffmpeg],
    43     [AS_HELP_STRING([--with-ffmpeg[=DIR]],
    44       [location of ffmpeg @<:@default=yes@:>@])],
    45     [],
    46     [with_ffmpeg=yes])
    47 
    48 RP_LANG_PYTHON
    49 
    50 AC_ARG_WITH(
    5114    [statsdir],
    5215    [AS_HELP_STRING([--with-statsdir=DIR],
     
    5518    [STATSDIR="/var/tmp/visservers"])
    5619
    57 VERSION=0.0.1
     20RP_LANG_PYTHON
    5821
    5922#------------------------------------------------------------------------
     
    8144SC_CONFIG_CFLAGS
    8245
    83 
    8446AC_PATH_X
    8547
     
    9759
    9860AC_C_BIGENDIAN
    99 AC_CHECK_SIZEOF(int, 4)
    100 AC_CHECK_SIZEOF(long, 4)
    101 AC_CHECK_SIZEOF(long long, 8)
    102 AC_CHECK_SIZEOF(void *, 4)
    103 AC_CHECK_SIZEOF(float, 4)
    10461
    10562# Save the values as shell variables so that we can substitute them
    10663# into bltHash.h for situtations where there's no bltInt.h.
    107 
    10864
    10965LD_RPATH="";
     
    11975#       CgGL headers and library
    12076#       pthread library
    121 #       ffmpeg headers and library (started)
    12277#
    12378
     
    12580for dir in \
    12681 ${exec_prefix} \
    127  ${exec_prefix}/lib \
    128  ${with_rappture} \
    129  ${with_rappture}/lib ; do
     82 ${exec_prefix}/lib ; do
    13083  tclconfig="${dir}/tclConfig.sh"
    13184  if test -f "$tclconfig" ; then
     
    147100fi
    148101
    149 RP_DIR=""
    150 AC_MSG_CHECKING([for rappture])
    151 if test "$with_rappture" == "yes" ; then
    152   for dir in "$exec_prefix" "/usr" ; do
    153     if test -r "$dir/include/rappture2/rappture2.h" -a \
    154      -r "$dir/lib/librappture.a"; then
    155       RP_DIR="$dir"
    156       RP_INC_SPEC="-I$dir/include -I$dir/include/rappture2"
    157       RP_LIB_DIR="$dir/lib"
    158       AC_MSG_RESULT([$dir])
    159       break
    160     fi
    161   done
    162 else
    163   if test ! -d "$with_rappture" ; then
    164     AC_MSG_ERROR([--with-rappture: no such directory $with_rappture])
    165   fi
    166   RP_DIR=$with_rappture
    167   RP_INC_SPEC="-I$with_rappture/include -I$with_rappture/include/rappture2"
    168   RP_LIB_DIR="$with_rappture/lib"
    169 fi
    170 if test "x${RP_DIR}" = "x" ; then
    171   AC_MSG_ERROR([cannot find rappture.h and librappture2.a, try using --with-rappture])
    172 else
    173   AC_MSG_RESULT([$with_rappture])
    174 fi
    175 
    176 # This could be temporary. We are assuming that we're using VTK 6+.
    177 # Since VTK 6 hasn't been released, we will look it only in the
    178 # Rappture build directories.
    179 VTK_LIB_DIR=${libdir}
    180 dnl Prefer our VTK installation over systems. --with-vtk overrides.
    181 if test "$with_vtk" != "no" ; then
    182   if test "$with_vtk" = "yes" ; then
    183     for dir in vtk-6.{10,9,8,7,6,5,4,3,2,1,0} ; do
    184       if test -d "${incdir}/$dir"; then
    185         VTK_INC_SPEC="-I${incdir}/$dir"
    186         break
    187       fi
    188     done
    189   fi
    190 fi
    191 
    192 if test "x$with_vtk_includes" != "x"; then
    193    VTK_INC_SPEC=-I$with_vtk_includes
    194 fi
    195 
    196 if test "x$with_vtk_libs" != "x"; then
    197    VTK_LIB_DIR=$with_vtk_libs
    198    VTK_LIB_SPEC="-L$with_vtk_libs"
    199 fi
    200 
    201 save_CPPFLAGS=$CPPFLAGS
    202 CPPFLAGS=$VTK_INC_SPEC
    203 AC_CHECK_HEADERS([vtkSmartPointer.h], [], [AC_MSG_WARN([cannot find vtkSmartPointer.h])])
    204 CPPFLAGS=$save_CPPFLAGS
    205 
    206 AC_CHECK_HEADER([GL/glut.h])
    207102AC_CHECK_HEADER([GL/glew.h])
    208103
     
    212107AC_CHECK_FUNCS([accept4])
    213108
    214 save_CPPFLAGS=$CPPFLAGS
     109SUBDIRS="nanoscale pymolproxy"
    215110
    216 
    217 #--------------------------------------------------------------------
    218 # search for ffmpeg executable
    219 #--------------------------------------------------------------------
    220 if test "${with_ffmpeg}" != "no" ; then
    221   if test "${with_ffmpeg}" = "yes" ; then
    222     AC_PATH_PROG(FFMPEG, ffmpeg)
    223   else
    224     AC_PATH_PROG(FFMPEG, ffmpeg, [], [${with_ffmpeg}/bin:${with_ffmpeg}])
    225   fi
    226   if test "${FFMPEG}x" != "x" ; then
    227     AC_DEFINE(HAVE_FFMPEG, 1, [nanovis can use ffmpeg to create videos.])
    228   fi
    229 fi
    230 
    231 AC_MSG_CHECKING([for nVidia Cg installation])
    232 CG_DIR=""
    233 for dir in \
    234  /opt/nvidia-cg-toolkit \
    235  /usr/cg \
    236  /usr
    237 do
    238   if test -r "$dir/include" ; then
    239     CG_DIR=$dir
    240     break
    241   fi
    242 done
    243 AC_MSG_RESULT([${CG_DIR}])
    244 
    245 CG_INC_SPEC="-I${CG_DIR}/include"
    246 
    247 save_CPPFLAGS=$CPPFLAGS
    248 CPPFLAGS="${CG_INC_SPEC} $CPPFLAGS"
    249 AC_CHECK_HEADERS([Cg/cgGL.h], [], AC_MSG_WARN([cannot find nVidia Cg headers]))
    250 CPPFLAGS=$save_CPPFLAGS
    251 
    252 CG_LIB_DIR=""
    253 for dir in \
    254  /opt/nvidia-cg-toolkit \
    255  /usr/cg \
    256  /usr
    257 do
    258   if test -r "$dir/lib" ; then
    259     CG_LIB_DIR=$dir/lib
    260     break
    261   fi
    262   if test -r "$dir/lib64" ; then
    263     CG_LIB_DIR=$dir/lib64
    264     break
    265   fi
    266 done
    267 
    268 if test "${CG_LIB_DIR}" = "/usr/lib" ; then
    269   CG_INC_SPEC=""
    270   CG_LIB_SPEC="-lCg -lCgGL"
    271 else
    272   CG_LIB_SPEC="-L${CG_LIB_DIR} -lCg -lCgGL"
    273   LD_RPATH="$loader_run_path:${CG_LIB_DIR}"
    274 fi
    275 
    276 SUBDIRS="nanoscale nanovis pymolproxy vtkvis"
    277 
    278 AC_SUBST(CFLAGS_DEBUG)
    279 AC_SUBST(CFLAGS_OPTIMIZE)
    280 AC_SUBST(CG_INC_SPEC)
    281 AC_SUBST(CG_LIB_SPEC)
    282 AC_SUBST(FFMPEG)
    283111AC_SUBST(LD_RPATH)
    284 AC_SUBST(RP_DIR)
    285 AC_SUBST(RP_INC_SPEC)
    286 AC_SUBST(RP_LIB_DIR)
    287 AC_SUBST(SHLIB_CFLAGS)
    288 AC_SUBST(SHLIB_LD)
    289 AC_SUBST(SHLIB_LDFLAGS)
    290 AC_SUBST(SHLIB_SUFFIX)
    291 AC_SUBST(SIZEOF_FLOAT)
    292 AC_SUBST(SIZEOF_INT)
    293 AC_SUBST(SIZEOF_LONG)
    294 AC_SUBST(SIZEOF_LONG_LONG)
    295 AC_SUBST(SIZEOF_VOID_P)
    296112AC_SUBST(STATSDIR)
    297 AC_SUBST(STLIB_LD)
    298113AC_SUBST(SUBDIRS)
    299114AC_SUBST(PYTHON)
     
    301116AC_SUBST(TCL_LIB_SPEC)
    302117AC_SUBST(TCL_VERSION)
    303 AC_SUBST(VERSION)
    304 AC_SUBST(VTK_INC_SPEC)
    305 AC_SUBST(VTK_LIB_DIR)
    306118
    307119AC_OUTPUT([
     
    309121   nanoscale/Makefile \
    310122   nanoscale/renderservers.tcl \
    311    nanovis/Doxyfile \
    312    nanovis/Makefile \
    313    nanovis/graphics/Makefile \
    314    nanovis/imgLoaders/Makefile \
    315    nanovis/newmat11/Makefile \
    316    nanovis/util/Makefile \
    317    nanovis/vrmath/Makefile \
    318123   pymolproxy/Makefile \
    319    vtkvis/Doxyfile \
    320    vtkvis/Makefile \
    321124   start_nanoscale.sh])
Note: See TracChangeset for help on using the changeset viewer.