source: vtkvis/trunk/configure.in @ 5119

Last change on this file since 5119 was 4595, checked in by ldelgass, 10 years ago

Update version numbers in configure

File size: 3.4 KB
Line 
1AC_PREREQ([2.60])
2AC_INIT([vtkvis], [1.8], [rappture@nanohub.org])
3AC_CONFIG_AUX_DIR(cf)
4
5AC_ARG_WITH(
6    [tcllib],
7    [AS_HELP_STRING([--with-tcllib[=DIR]],
8        [location of Tcl binary library libtclstubs.a @<:@default=/usr/lib@:>@])],
9    [with_tcllib=$withval],
10    [with_tcllib=""])
11
12AC_ARG_WITH(
13    [vtk-includes],
14    [AS_HELP_STRING([--with-vtk-includes=DIR],
15        [location of versioned VTK include dir])],
16    [with_vtk_includes=$withval],
17    [with_vtk_includes=""])
18
19AC_ARG_WITH(
20    [vtk-libs],
21    [AS_HELP_STRING([--with-vtk-libs=DIR],
22        [VTK libraries are in DIR])],
23    [with_vtk_libs=$withval],
24    [with_vtk_libs=""])
25
26AC_ARG_WITH(
27    [vtk],
28    [AS_HELP_STRING([--with-vtk=VERSION],
29        [Version of VTK required @<:@default=6.1@:>@])],
30    [with_vtk=$withval],
31    [with_vtk=""])
32
33AC_ARG_WITH(
34    [statsdir],
35    [AS_HELP_STRING([--with-statsdir=DIR],
36        [Write statistics in DIR])],
37    [STATSDIR=$withval],
38    [STATSDIR="/var/tmp/visservers"])
39
40#------------------------------------------------------------------------
41# Handle the --prefix=... option
42#------------------------------------------------------------------------
43
44if test "${prefix}" = "NONE"; then
45    prefix=/usr/local
46fi
47if test "${exec_prefix}" = "NONE"; then
48    exec_prefix=$prefix
49fi
50
51if test "x${incdir}" == "x"; then
52  incdir=${exec_prefix}/include
53fi
54libdir=${exec_prefix}/lib
55
56if test "${libdir}" != "${prefix}/lib"; then
57    LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}"
58else
59    LIB_SEARCH_DIRS="-L ${libdir}"
60fi
61
62AC_PROG_INSTALL
63AC_PROG_RANLIB
64AC_PROG_LN_S
65AC_PROG_MKDIR_P
66
67dnl find and test the C compiler
68AC_PROG_CC
69AC_PROG_CPP
70AC_PROG_CXXCPP
71AC_PROG_CXX
72AC_LANG_CPLUSPLUS
73
74#
75# Need to check for the following dependencies:
76#       Tcl headers and library
77#       GL headers and library
78#       pthread library
79#       vtk libraries
80#
81
82TCL_VERSION="8.4"
83for dir in \
84 ${exec_prefix} \
85 ${exec_prefix}/lib ; do
86  tclconfig="${dir}/tclConfig.sh"
87  if test -f "$tclconfig" ; then
88    . $tclconfig
89    break
90  fi
91done
92TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
93
94if test "x$with_tcllib" != "x" ; then
95   tclconfig="${with_tcllib}/tclConfig.sh"
96   if test -f "$tclconfig" ; then
97    . $tclconfig
98   fi
99   TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}"
100fi
101if test "x$with_tclinclude" != "x" ; then
102   TCL_INC_SPEC="-I${with_tclinclude}"
103fi
104
105# We are assuming that we're using VTK 6.0
106VTK_VERSION=6.1
107VTK_LIB_DIR=${libdir}
108VTK_INC_DIR=${incdir}
109
110if test "x$with_vtk_includes" != "x"; then
111   VTK_INC_DIR=$with_vtk_includes
112fi
113
114if test "x$with_vtk_libs" != "x"; then
115   VTK_LIB_DIR=$with_vtk_libs
116fi
117
118dnl Prefer our VTK installation over systems. --with-vtk overrides.
119if test "x$with_vtk" != "x" ; then
120   VTK_VERSION=$with_vtk
121fi
122
123if ! test -d "$VTK_INC_DIR/vtk-${VTK_VERSION}" ; then
124   AC_ERROR([Couldn't find VTK includes])
125else
126   VTK_INC_SPEC="-I${VTK_INC_DIR}/vtk-${VTK_VERSION}"
127fi
128
129save_CPPFLAGS=$CPPFLAGS
130CPPFLAGS=$VTK_INC_SPEC
131AC_CHECK_HEADERS([vtkSmartPointer.h], [], [AC_MSG_WARN([cannot find vtkSmartPointer.h])])
132CPPFLAGS=$save_CPPFLAGS
133
134AC_CHECK_HEADERS([stdio.h unistd.h stdlib.h string.h sys/types.h])
135AC_CHECK_HEADERS([sys/socket.h sys/time.h netinet/in.h arpa/inet.h netdb.h])
136
137AC_CHECK_FUNCS([accept4])
138
139AC_SUBST(STATSDIR)
140AC_SUBST(TCL_INC_SPEC)
141AC_SUBST(TCL_LIB_SPEC)
142AC_SUBST(TCL_VERSION)
143AC_SUBST(VTK_VERSION)
144AC_SUBST(VTK_INC_DIR)
145AC_SUBST(VTK_LIB_DIR)
146
147AC_OUTPUT([
148   Doxyfile \
149   Makefile])
Note: See TracBrowser for help on using the repository browser.