source: branches/blt4/configure.in @ 1972

Last change on this file since 1972 was 1972, checked in by gah, 14 years ago
File size: 25.4 KB
RevLine 
[1270]1AC_INIT([Rappture],[1.1],[rappture@nanohub.org])
2dnl AC_CONFIG_HEADER(src/core/RpConfig.h)
[1081]3AC_CONFIG_AUX_DIR(cf)
[1403]4AC_CONFIG_HEADER(src/core/config.h)
[489]5
6#------------------------------------------------------------------------
7# Handle the --prefix=... option
8#------------------------------------------------------------------------
9
10if test "${prefix}" = "NONE"; then
11    prefix=/usr/local
12fi
13if test "${exec_prefix}" = "NONE"; then
14    exec_prefix=$prefix
15fi
16
[708]17if test "${libdir}" != "${prefix}/lib"; then
[872]18    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
[708]19else
[872]20    LIB_SEARCH_DIRS="-L${libdir}"
[708]21fi
22
[718]23AC_SUBST(LIB_SEARCH_DIRS)
24
[708]25AC_PROG_INSTALL
[1680]26AC_PROG_INSTALL
27AC_PROG_RANLIB
28AC_PROG_LN_S
29AC_PROG_MKDIR_P
[489]30AC_PROG_MAKE_SET
31
[1132]32# Check for C, C++, and FORTRAN
[489]33AC_PROG_CC
[1132]34AC_PROG_CXX
35# Avoid g95
36AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
37
[1270]38AC_LANG([C])
[1132]39
[489]40AC_HEADER_STDC
41AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
42
[1270]43AC_LANG([C++])
[489]44
[1403]45AC_CHECK_FUNCS([sysinfo])
46AC_CHECK_HEADERS(sys/sysinfo.h)
47
[1262]48AC_CHECK_LIB(m, main,,AC_MSG_ERROR(librappture requires libm))
[489]49AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++))
[1262]50AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?))
51AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?))
52AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?))
53AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?))
54AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?))
55AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?))
56AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?))
57AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?))
58AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?))
59AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?))
60AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?))
61AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?))
[489]62AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?))
63AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
64AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
65
[1262]66AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?))
67AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?))
68AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?))
69AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?))
70AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?))
71AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?))
72AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?))
73AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?))
74AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?))
75dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?))
76AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?))
77AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?))
78AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?))
[489]79
[1262]80AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?))
81if test "${ac_cv_header_inttypes_h}" = "yes" ; then
82  HAVE_INTTYPES_H=1
83else
84  HAVE_INTTYPES_H=0
85fi
86AC_SUBST(HAVE_INTTYPES_H)
87
88
[1018]89SC_CONFIG_CFLAGS
[718]90
[1058]91make_command=""
[1087]92for m in "$MAKE" make gmake gnumake ; do
93  if test "x${m}" != "x" ; then
94    if  ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then
[1058]95      make_command=$m; break;
96    fi
97  fi
98done
99if test "x${make_command}" = "x" ; then
[1270]100  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
[1058]101fi
102AC_SUBST(MAKE, ${make_command})
103
[905]104AC_ARG_ENABLE(
105    [gui],
106    [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])],
107    [],
108    [enable_gui=yes])
109
110ENABLE_GUI=
111if test "$enable_gui" != "no" ; then
112    ENABLE_GUI="yes"
113fi
114AC_SUBST(ENABLE_GUI)
115
[1588]116with_tclsh="yes"
[905]117AC_ARG_WITH(
118    [tclsh],
119    [AS_HELP_STRING([--with-tclsh[=DIR]],
[1588]120        [location of tclsh @<:@default=yes@:>@])],
[905]121    [],
[1588]122    [with_tclsh=yes])
[718]123
[905]124TCLSH=
125if test "$with_tclsh" != "no" ; then
126    AC_MSG_CHECKING([for tclsh])
127    if test -x "$with_tclsh/bin/tclsh"
128    then
129        echo Found tclsh in $with_tclsh/bin/tclsh
130        TCLSH="$with_tclsh/bin/tclsh"
131    else
[1897]132       if test -x "$with_tclsh"
[905]133        then
134            echo Found tclsh in $with_tclsh
135            TCLSH="$with_tclsh"
136        else
[1897]137            if test -x "${exec_prefix}/bin/tclsh"
138            then
139                echo Found tclsh in ${exec_prefix}/bin/tclsh
140                TCLSH="${exec_prefix}/bin/tclsh"
141            else
142                for v in 8.4 8.5 8.6 ; do
143                    if test -x "${exec_prefix}/bin/tclsh${v}"
144                    then
145                        echo Found tclsh in ${exec_prefix}/bin/tclsh${v}
146                        TCLSH="${exec_prefix}/bin/tclsh${v}"
147                        break
148                    fi
149                done
150            fi
[905]151        fi
152    fi
[1897]153    if ! test -x ${TCLSH}
154    then
155        AC_PATH_PROG(TCLSH, tclsh)
156    fi
[905]157fi
[1897]158
[905]159AC_MSG_RESULT([${TCLSH}])
160AC_SUBST(TCLSH)
161
[1643]162TCL_VERSION="8.4"
163for dir in \
164 ${exec_prefix} \
165 ${exec_prefix}/lib ; do
166  tclconfig="${dir}/tclConfig.sh"
167  if test -f "$tclconfig" ; then
168    . $tclconfig
169    break
170  fi
171done
172TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
[905]173
[1643]174if test "x$with_tcllib" != "x" ; then
175   tclconfig="${with_tcllib}/tclConfig.sh"
176   if test -f "$tclconfig" ; then
177    . $tclconfig
178   fi
179   TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}"
180fi
181if test "x$with_tclinclude" != "x" ; then
182   TCL_INC_SPEC="-I${with_tclinclude}"
183fi
184
185AC_SUBST(TCL_VERSION)
186AC_SUBST(TCL_INC_SPEC)
187AC_SUBST(TCL_LIB_SPEC)
188
[718]189AC_ARG_WITH(
[1680]190    [vtk],
191    [AS_HELP_STRING([--with-vtk[=DIR]],
192        [location of vtk library @<:@default=yes@:>@])],
193    [with_vtk=$withval], [with_vtk=yes])
194
195AC_MSG_CHECKING([for vtk])
196VTKDIR=""
197
198if test "$with_vtk" != "no" ; then
199  if test "$with_vtk" = "yes" ; then
200    for path in \
201     $libdir \
202     $prefix/lib \
203     $exec_prefix/lib \
204     /usr/lib
205    do
206      for vtk in $path/vtk-* ; do
[1897]207        if test -d "${vtk}" ; then
208          VTKDIR=${vtk}
209        fi
[1680]210      done
211      if test "x${VTKDIR}" != "x" ; then
[1897]212        break
[1680]213      fi
214    done
215  fi
216fi
217AC_SUBST(VTKDIR)
218AC_MSG_RESULT([$VTKDIR])
219
220
221AC_ARG_WITH(
[718]222    [matlab],
223    [AS_HELP_STRING([--with-matlab[=DIR]],
[1588]224        [location of matlab and mex compiler @<:@default=yes@:>@])],
[1058]225    [with_matlab=$withval],
226    [with_matlab=yes])
[718]227
[1159]228MCC=""
[1049]229MEX=""
230MEX_ARCH=""
231MEXEXT=""
[1101]232MATLAB=
[833]233if test "$with_matlab" != "no" ; then
[1057]234  if test "$with_matlab" = "yes" ; then
[1101]235    AC_PATH_PROG(MATLAB, matlab)
[1057]236  else
[1579]237    AC_PATH_PROG(MATLAB, matlab, [], [${with_matlab}/bin:${with_matlab}])
[1057]238  fi
[833]239fi
[1121]240
241if test "x$MATLAB" != "x" ; then
[1148]242  # Found matlab.  May be a symlink to the real binary.  Run "matlab -e"
243  # to tell where matlab is installed.
244
245  matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin
246
247  # Now see if we can find "mex" or "mexext" there.
[1579]248  AC_PATH_PROG(MEX, mex, [], [${matlab_bindir}])
249  AC_PATH_PROG(MEXEXT, mexext, [], [${matlab_bindir}])
[1148]250
251  # Run "mexext" to get the expected module extension for this platform.
[1121]252  AC_MSG_CHECKING([for mex extension])
[1159]253  if test "x$MEXEXT" != "x" ; then
[1148]254    MEXEXT=`$MEXEXT`
[1159]255  else
[1148]256    MEXEXT="mexglx"
[1121]257  fi
[1148]258  AC_MSG_RESULT([$MEXEXT])
[1579]259  AC_PATH_PROG(MCC, mcc, [], [${matlab_bindir}])
[1159]260  AC_MSG_CHECKING([for mcc extension])
[1101]261fi
[1121]262
[1159]263AC_SUBST(MCC)
[718]264AC_SUBST(MEX)
[1101]265AC_SUBST(MATLAB)
[718]266AC_SUBST(MEX_ARCH)
267AC_SUBST(MEXEXT)
[708]268
[1881]269# Standard octave search (use the installed version of octave)
[718]270AC_ARG_WITH(
271    [octave],
272    [AS_HELP_STRING([--with-octave[=DIR]],
[1588]273        [location of octave compiler MKOCTFILE @<:@default=yes@:>@])],
[1058]274    [with_octave=$withval],
275    [with_octave=yes])
[718]276
[1262]277OCTAVE=
[1881]278OCTAVE2=
279OCTAVE3=
[1262]280OCTAVE_VERSION=
281OCTAVE_VERSION_MAJOR=
[508]282MKOCTFILE=
[1881]283MKOCTFILE2=
284MKOCTFILE3=
[833]285if test "$with_octave" != "no" ; then
[1262]286  AC_MSG_CHECKING([for octave and mkoctfile])
[1057]287  if test "$with_octave" = "yes" ; then
[1262]288    AC_PATH_PROG(OCTAVE, octave)
[1057]289    AC_PATH_PROG(MKOCTFILE, mkoctfile)
290  else
[1897]291    MKOCTFILE=$with_octave
292    OCTAVE=$with_octave
[1057]293  fi
[1897]294fi
295if test "x${OCTAVE}" != "x" ; then
296  OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4`
297  OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1`
298  if test "${OCTAVE_VERSION_MAJOR}" == "3" ; then
299    OCTAVE3=$OCTAVE
300    MKOCTFILE3=$MKOCTFILE
[1262]301  fi
[1897]302  if test "${OCTAVE_VERSION_MAJOR}" == "2" ; then
303    OCTAVE2=$OCTAVE
304    MKOCTFILE2=$MKOCTFILE
305  fi
[833]306fi
[1881]307
308# Check if octave2 was designated *in addition* to the installed version.
309AC_ARG_WITH(
310    [octave2],
311    [AS_HELP_STRING([--with-octave2[=DIR]],
312        [location of octave compiler MKOCTFILE @<:@default=no@:>@])],
313    [with_octave2=$withval],
314    [with_octave2=no])
315
316if test "$with_octave2" != "no" ; then
[1897]317  if test "$with_octave2" = "yes" ; then
318    AC_MSG_CHECKING([for octave and mkoctfile])
319    AC_PATH_PROG(octave2, octave)
320    AC_PATH_PROG(mkoctfile2, mkoctfile)
321  else
322    octave2=$with_octave2
323    mkoctfile2=`dirname $with_octave2`/mkoctfile
[1881]324  fi
325fi
[1897]326if test "x${octave2}" != "x" ; then
327  version=`${octave2} -v | grep version | cut -d' ' -f4`
328  version_major=`echo ${version} | cut -d'.' -f1`
329  if test "$version_major" = "2" ; then
330    OCTAVE2=$octave2
331    MKOCTFILE2=$mkoctfile2
332  fi
333fi
334
[1881]335# Check if octave3 was designated *in addition* to the installed version.
[1897]336
[1881]337AC_ARG_WITH(
338    [octave3],
339    [AS_HELP_STRING([--with-octave3[=DIR]],
340        [location of octave compiler MKOCTFILE @<:@default=no@:>@])],
341    [with_octave3=$withval],
342    [with_octave3=no])
[1897]343
344echo with_octave3=$with_octave3
[1881]345if test "$with_octave3" != "no" ; then
[1897]346  if test "$with_octave3" = "yes" ; then
347    AC_MSG_CHECKING([for octave and mkoctfile])
348    AC_PATH_PROG(octave3, octave)
349    AC_PATH_PROG(mkoctfile3, mkoctfile)
350  else
351    octave3=$with_octave3
352    mkoctfile3=`dirname $with_octave3`/mkoctfile
[1881]353  fi
354fi
355
[1897]356echo octave3=$octave3
357if test "x${octave3}" != "x" ; then
358  echo version="${octave3} -v | grep version | cut -d' ' -f4"
359  version=`${octave3} -v | grep version | cut -d' ' -f4`
360  echo version=$version
361  version_major=`echo ${version} | cut -d'.' -f1`
362  echo version_major=$version_major
363  if test "$version_major" = "3" ; then
364    OCTAVE3=$with_octave3
365    MKOCTFILE3=$mkoctfile3
366  fi
367fi
368
[1881]369AC_SUBST(OCTAVE2)
370AC_SUBST(OCTAVE3)
[1262]371AC_SUBST(OCTAVE)
372AC_SUBST(OCTAVE_VERSION)
373AC_SUBST(OCTAVE_VERSION_MAJOR)
[718]374AC_SUBST(MKOCTFILE)
[1881]375AC_SUBST(MKOCTFILE2)
376AC_SUBST(MKOCTFILE3)
[498]377
[1897]378AC_ARG_WITH(
379    [perl],
380    [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])],
381    [],
382    [with_perl=yes])
383
[508]384PERL=
385PERL_INCLUDES=
[1082]386PERL_ARCHLIB=
[1097]387PERL_ARCHLIBEXP=
[1087]388PERL_VERSION=
[1092]389PERL_VENDORLIB=
390PERL_PRIVLIB=
391PERL_CPPFLAGS=
392PERL_CCFlAGS=
[1087]393PERL_VERSION_RV=
[1148]394PERL_LIBSPEC=
[498]395if test "$with_perl" != "no" ; then
[1148]396  AC_MSG_CHECKING([for perl])
[1588]397  if test "$with_perl" != "yes" ; then
[1579]398    AC_PATH_PROG(PERL, perl, [], [$with_perl/bin:$with_perl])
[1148]399  else
400    AC_PATH_PROG(PERL, perl)
401  fi
402  if test "x${PERL}" != "x" ; then
403    PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'`
404    PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'`
405    PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'`
406    PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'`
407    PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'`
408    PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'`
409    PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'`
410    PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'`
411    PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2`
412    echo perllib="${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}"
413
414    # libperl may or may not be installed.  Check for its existence.
415    if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then
[1149]416      PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl"
[498]417    fi
[1148]418  fi
[498]419fi
[718]420AC_MSG_RESULT([${PERL}])
421AC_SUBST(PERL)
422AC_SUBST(PERL_INCLUDES)
[1082]423AC_SUBST(PERL_ARCHLIB)
[1097]424AC_SUBST(PERL_ARCHLIBEXP)
[1087]425AC_SUBST(PERL_VERSION)
[1092]426AC_SUBST(PERL_CCFLAGS)
427AC_SUBST(PERL_CPPFLAGS)
428AC_SUBST(PERL_VENDORLIB)
429AC_SUBST(PERL_PRIVLIB)
[1093]430AC_SUBST(PERL_INSTALLARCHLIB)
[1087]431AC_SUBST(PERL_VERSION_RV)
[1148]432AC_SUBST(PERL_LIBSPEC)
[497]433
[1049]434PYTHON=""
435PYTHON_CFLAGS=""
436PYTHON_CPPFLAGS=""
[1081]437HAVE_PYTHON_DISTUTILS=""
[1049]438PYTHON_INCLUDES=""
439PYTHON_LDFLAGS=""
440PYTHON_LIB=""
441PYTHON_LIBDIR=""
[1055]442PYTHON_SITE_DIR=""
[1049]443PYTHON_SITE_PACKAGES=""
444PYTHON_VERSION=""
445pythondir=""
446
447AC_ARG_WITH([python],
[1588]448    [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=yes@:>@])],
[718]449    [],
[1588]450    [with_python=yes])
[718]451
[497]452if test "$with_python" != "no" ; then
[1047]453  AC_MSG_CHECKING([for python])
[1049]454  if test -x "$with_python/bin/python"; then
[1047]455    echo Found python in $with_python/bin/python
456    PYTHON="$with_python/bin/python"
[1049]457  elif test -x "$with_python"; then
458    echo Found python in $with_python
459    PYTHON="$with_python"
[1047]460  else
[1049]461    AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
[1047]462  fi
[1049]463  if test "x${PYTHON}" != "x"; then
[1047]464    PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
465    echo Using python version $PYTHON_VERSION
466  fi
[1049]467  if test "x${PYTHON_VERSION}" != "x"; then
[497]468    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
[1049]469     -d $with_python/lib/python$PYTHON_VERSION/site-packages; then
[1047]470      PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
471      PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
[497]472    else
[1049]473      if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then
[1087]474        PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
475        PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
[1047]476      else
[1087]477        if test -r /usr/include/python$PYTHON_VERSION/Python.h; then
478          PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
479          PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
480        else
481          echo could not find python$PYTHON_VERSION/Python.h
482        fi
[1047]483      fi
[1049]484      if test ! -d "$PYTHON_SITE_PACKAGES"; then
[1087]485        PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
[1047]486      fi
[497]487    fi
[1047]488  fi
489  if test "x$with_python" != "x" ;  then
490    pythondir='$(PYTHON_SITE_PACKAGES)'
491  else
492    pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
493  fi
[1049]494
[1047]495  AC_MSG_CHECKING([for python distutils])
[1055]496  ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \
[1087]497        build build_ext 2>&1 > /dev/null
[1055]498  if test $? = 0 ; then
[1081]499    HAVE_PYTHON_DISTUTILS="yes"
[1047]500  else
[1588]501     HAVE_PYTHON_DISTUTILS="no"
[1047]502  fi
[1081]503  AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS])
[1087]504
[1081]505  if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then
[1049]506    #
507    # Check for Python include path
508    #
509    AC_MSG_CHECKING([for Python include path])
510    if test "x${PYTHON_CPPFLAGS}" = "x"; then
[1055]511      incdir_path=`${PYTHON} -c "import distutils.sysconfig; \
[1049]512       print distutils.sysconfig.get_python_inc();"`
[1055]513      if test -n "${incdir}"; then
[1087]514        python_path="-I${incdir}"
[1049]515      fi
516      PYTHON_CPPFLAGS=$python_path
517    fi
518    AC_MSG_RESULT([$PYTHON_CPPFLAGS])
519    AC_SUBST([PYTHON_CPPFLAGS])
520    #
521    # python distutils found, get settings from python directly
522    #
523    AC_MSG_CHECKING([location of site-packages])
524    PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`"
[1087]525
[1049]526    PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`"
527    PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`"
528    PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`"
529    PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`"
530  fi
531fi 
[497]532AC_SUBST(pythondir)
533
534AC_SUBST(PYTHON)
535AC_SUBST(PYTHON_VERSION)
536AC_SUBST(PYTHON_INCLUDES)
537AC_SUBST(PYTHON_SITE_PACKAGES)
[1081]538AC_SUBST(HAVE_PYTHON_DISTUTILS)
[497]539
[1897]540rappture_with_ruby="yes"
[489]541
[1018]542RUBY=""
[1081]543RUBY_DEV_PKG="no"
544
[1087]545AC_ARG_WITH(ruby,
546  AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]),
[1897]547  [rappture_with_ruby=$with_val])
548if test "${rappture_with_ruby}" != "no" ; then
549  if test "${rappture_with_ruby}" = "yes" ; then
[1081]550    AC_PATH_PROG(RUBY, ruby)
551  else
[1579]552    AC_PATH_PROG(RUBY, ruby, [],
[1897]553      [${rappture_with_ruby}/bin/ruby:${rappture_with_ruby}])
[1081]554  fi
[1018]555fi
556AC_SUBST(RUBY)
557
[1087]558RUBY_VERSION_RV=
559RUBY_PLATFORM=
[1081]560if test "x${RUBY}" != "x" ; then
561  AX_PROG_RUBY_VERSION
[1087]562  RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2`
563  RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'`
[1081]564  ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1`
565  if test -z "$ac_mkmf_result"; then
566    HAVE_RUBY_DEVEL="yes"
567    AX_RUBY_DEV_FLAGS([${RUBY}])
568  fi
569fi
570AC_SUBST(HAVE_RUBY_DEVEL)
[1087]571AC_SUBST(RUBY_VERSION_RV)
572AC_SUBST(RUBY_PLATFORM)
[1081]573
[1972]574rp_with_java="yes"
[1744]575JAVA=""
576JAVAH=""
577JAVAC=""
578JAVA_DEV_PKG="no"
[1972]579AC_ARG_WITH(
580    [java],
581    [AS_HELP_STRING([--with-java=DIR], [location of java @<:@default=yes@:>@])],
582    [rp_with_java=$withval])
[1744]583
[1972]584if test "${rp_with_java}" != "no" ; then
585  if test "${rp_with_java}" = "yes" ; then
586    AC_PATH_PROG(JAVA,  java)
[1897]587    AC_PATH_PROG(JAVAC, javac)
588    AC_PATH_PROG(JAVAH, javah)
589  else
[1972]590    AC_PATH_PROG(JAVA,  java,  [], [${rp_with_java}/bin:${rp_with_java}])
591    AC_PATH_PROG(JAVAC, javac, [], [${rp_with_java}/bin:${rp_with_java}])
592    AC_PATH_PROG(JAVAH, javah, [], [${rp_with_java}/bin:${rp_with_java}])
[1897]593  fi
594fi
[1744]595JDK=
596JAVA_HOME=
597JAVA_INC_DIR=
598JAVA_INC_SPEC=
599
600# If java exists, let's look for the jni.h file.
601if test "x${JAVA}" != "x" ; then
602  for d in \
603   /apps/java/jdk1.6.0_01 \
[1897]604   /usr/lib/jvm/*sun-1.6* \
605   /opt/sun-jdk-1.6* \
[1744]606   /opt/icedtea6-* \
[1897]607   /opt/sun-jdk-1.5* \
608   /usr/lib/jvm/*sun-1.5*
609  do
[1744]610    if test -r "${d}/include/jni.h" ; then
611      JDK=${d}
612      break;
613    fi
614  done
615  JAVA_HOME=$JDK
616  JAVA_INC_DIR=${JDK}/include
617  JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux"
618fi
619
620AC_SUBST(JAVA)
621AC_SUBST(JAVAC)
622AC_SUBST(JAVAH)
623AC_SUBST(JAVA_HOME)
624AC_SUBST(JAVA_INC_DIR)
625AC_SUBST(JAVA_INC_SPEC)
626
[489]627RP_BASE=`pwd`
628AC_SUBST(RP_BASE)
629
[1018]630SC_ENABLE_SHARED
[512]631
[1018]632#--------------------------------------------------------------------
633# This macro figures out what flags to use with the compiler/linker
634# when building shared/static debug/optimized objects.  This information
635# is all taken from the tclConfig.sh file.
636#--------------------------------------------------------------------
637
638AC_SUBST(CFLAGS_DEBUG)
639AC_SUBST(CFLAGS_OPTIMIZE)
640AC_SUBST(STLIB_LD)
641AC_SUBST(SHLIB_LD)
642AC_SUBST(SHLIB_CFLAGS)
643AC_SUBST(SHLIB_LDFLAGS)
644AC_SUBST(SHLIB_SUFFIX)
645
[1897]646if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
[1132]647  . ${exec_prefix}/lib/tclConfig.sh
648fi
[1897]649if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
650  . ${exec_prefix}/lib/tkConfig.sh
[1132]651fi
[1082]652AC_SUBST(TCL_VERSION)
653AC_SUBST(TK_VERSION)
654
[1262]655# -----------------------------------------------------------------------
656#
657# Compiler characteristics:
658#   Check for existence of types of size_t and pid_t
659#
660# -----------------------------------------------------------------------
661
662AC_C_BIGENDIAN
663AC_CHECK_SIZEOF(int)
664AC_CHECK_SIZEOF(long)
665AC_CHECK_SIZEOF(long long)
666AC_CHECK_SIZEOF(void *)
667
668SIZEOF_LONG="${ac_cv_sizeof_long}"
669SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}"
670SIZEOF_VOID_P="${ac_cv_sizeof_void_p}"
671SIZEOF_INT="${ac_cv_sizeof_int}"
672AC_SUBST(SIZEOF_INT)
673AC_SUBST(SIZEOF_LONG)
674AC_SUBST(SIZEOF_LONG_LONG)
675AC_SUBST(SIZEOF_VOID_P)
676
677
[1018]678#--------------------------------------------------------------------
[1897]679# Set the default compiler switches based on the --enable-symbols
[1018]680# option.
681#--------------------------------------------------------------------
682
683SC_ENABLE_SYMBOLS
684
[1897]685
686#--------------------------------------------------------------------
687# search for ffmpeg libraries libavcodec, libavformat, libswscale
688#--------------------------------------------------------------------
689
690AC_CHECK_HEADERS(ffmpeg/avcodec.h,[],[],
691[[#define __STDC_CONSTANT_MACROS 1
692  #ifdef HAVE_FFMPEG_AVCODEC_H
693  # include <ffmpeg/avcodec.h>
694  #endif
695]])
696
697AC_CHECK_HEADERS(libavcodec/avcodec.h,[],[],
698[[#define __STDC_CONSTANT_MACROS 1
699  #ifdef HAVE_LIBAVCODEC_AVCODEC_H
700  # include <libavcodec/avcodec.h>
701  #endif
702]])
703
704AC_CHECK_HEADERS([ffmpeg/avformat.h],[],[],
705[[#define __STDC_CONSTANT_MACROS 1
706  #ifdef HAVE_FFMPEG_AVFORMAT_H
707  # include <ffmpeg/avformat.h>
708  #endif
709]])
710
711AC_CHECK_HEADERS([libavformat/avformat.h],[],[],
712[[#define __STDC_CONSTANT_MACROS 1
713  #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
714  # include <libavformat/avformat.h>
715  #endif
716]])
717
718AC_CHECK_HEADERS([ffmpeg/avutil.h],[],[],
719[[#define __STDC_CONSTANT_MACROS 1
720  #ifdef HAVE_FFMPEG_AVUTIL_H
721  # include <ffmpeg/avutil.h>
722  #endif
723]])
724
725AC_CHECK_HEADERS([libavutil/avutil.h],[],[],
726[[#define __STDC_CONSTANT_MACROS 1
727  #ifdef HAVE_LIBAVUTIL_AVUTIL_H
728  # include <libavutil/avutil.h>
729  #endif
730]])
731
732AC_CHECK_HEADERS([ffmpeg/swscale.h],[],[],
733[[#define __STDC_CONSTANT_MACROS 1
734  #ifdef HAVE_FFMPEG_SWSCALE_H
735  # include <ffmpeg/swscale.h>
736  #endif
737]])
738
739AC_CHECK_HEADERS([libswscale/swscale.h],[],[],
740[[#define __STDC_CONSTANT_MACROS 1
741  #ifdef HAVE_LIBSWSCALE_SWSCALE_H
742  # include <libswscale/swscale.h>
743  #endif
744]])
745
746HAVE_FFMPEG_LIBS=""
747if [[ \( "${ac_cv_header_ffmpeg_avcodec_h}" = "yes" -o \
748        "${ac_cv_header_libavcodec_avcodec_h}" = "yes" \) -a \
749     \( "${ac_cv_header_ffmpeg_avformat_h}" = "yes" -o \
750        "${ac_cv_header_libavformat_avformat_h}" = "yes" \) -a \
751     \( "${ac_cv_header_ffmpeg_avutil_h}" = "yes" -o \
752        "${ac_cv_header_libavutil_avutil_h}" = "yes" \) -a \
753     \( "${ac_cv_header_ffmpeg_swscale_h}" = "yes" -o \
754        "${ac_cv_header_libswscale_swscale_h}" = "yes" \) ]] ; then
755  HAVE_FFMPEG_LIBS="yes"
756  AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets])
757else
758  HAVE_FFMPEG_LIBS=""
759fi
760
761AC_CHECK_FUNCS(img_convert)
762AC_CHECK_FUNCS(sws_scale)
763AC_SUBST(HAVE_FFMPEG_LIBS)
764
[1055]765ac_configure_args="--disable-threads --enable-shared"
[1018]766AC_CONFIG_SUBDIRS( [packages/optimizer/src] )
[942]767
[489]768dnl read Makefile.in and write Makefile
[1270]769AC_CONFIG_FILES([
[1159]770    Makefile
[1087]771    packages/Makefile
772    src/Makefile
773    src/core/Makefile
774    src/core2/Makefile
775    src/objects/Makefile
[1270]776    src/objects/RpHash.h
[1087]777    gui/Makefile
778    gui/apps/Makefile
[1111]779    gui/apps/about
[1280]780    gui/apps/encodedata
[1087]781    gui/apps/rappture
[1175]782    gui/apps/rappture-csh.env
[1087]783    gui/apps/rappture.env
[1633]784    gui/apps/rappture.use
[1159]785    gui/apps/rerun
[1087]786    gui/apps/simsim
[1206]787    gui/apps/xmldiff
[1087]788    gui/pkgIndex.tcl
789    gui/scripts/Makefile
[1744]790    instant/Makefile
791    instant/irappture
[1087]792    lang/Makefile
[1744]793    lang/java/Makefile
794    lang/java/rappture/Makefile
[1087]795    lang/perl/Makefile
796    lang/perl/Makefile.PL
797    lang/python/Makefile
798    lang/python/setup.py
799    lang/matlab/Makefile
800    lang/octave/Makefile
[1897]801    lang/octave/octave2/Makefile
802    lang/octave/octave3/Makefile
[1087]803    lang/ruby/Makefile
804    lang/ruby/build.rb
805    lang/tcl/Makefile
806    lang/tcl/pkgIndex.tcl
807    lang/tcl/src/Makefile
808    lang/tcl/scripts/Makefile
809    lang/tcl/tests/Makefile
810    lib/Makefile
[1096]811    examples/3D/Makefile
[1087]812    examples/Makefile
[1096]813    examples/app-fermi/2.0/Makefile
[1087]814    examples/app-fermi/Makefile
815    examples/app-fermi/cee/Makefile
816    examples/app-fermi/fortran/Makefile
[1744]817    examples/app-fermi/java/Makefile
[1087]818    examples/app-fermi/matlab/Makefile
[1222]819    examples/app-fermi/matlab/compiled/Makefile
820    examples/app-fermi/matlab/uncompiled/Makefile
[1087]821    examples/app-fermi/octave/Makefile
[1593]822    examples/app-fermi/octave/2/Makefile
823    examples/app-fermi/octave/3/Makefile
[1087]824    examples/app-fermi/perl/Makefile
825    examples/app-fermi/python/Makefile
826    examples/app-fermi/ruby/Makefile
827    examples/app-fermi/tcl/Makefile
828    examples/app-fermi/wrapper/Makefile
829    examples/app-fermi/wrapper/cee/Makefile
[1897]830    examples/app-fermi/wrapper/perl/Makefile
[1087]831    examples/app-fermi/wrapper/python/Makefile
832    examples/app-fermi/wrapper/tcl/Makefile
833    examples/c-example/Makefile
834    examples/canvas/Makefile
835    examples/demo.bash
[1466]836    examples/flow/Makefile
837    examples/flow/demo1/Makefile
838    examples/flow/demo2/Makefile
839    examples/flow/demo3/Makefile
[1087]840    examples/graph/Makefile
[1096]841    examples/objects/Makefile
[1386]842    examples/objects/axis/Makefile
[1528]843    examples/objects/contour/Makefile
[1386]844    examples/objects/curve/Makefile
[1096]845    examples/objects/dxWriter/Makefile
846    examples/objects/floatBuffer/Makefile
[1528]847    examples/objects/histogram/Makefile
[1566]848    examples/objects/library/Makefile
[1386]849    examples/objects/number/Makefile
[1528]850    examples/objects/path/Makefile
[1386]851    examples/objects/plot/Makefile
[1528]852    examples/objects/scatter/Makefile
[1386]853    examples/objects/string/Makefile
[1528]854    examples/objects/tree/Makefile
855    examples/objects/xmlparser/Makefile
[1087]856    examples/zoo/Makefile
857    examples/zoo/binary/Makefile
858    examples/zoo/boolean/Makefile
859    examples/zoo/choice/Makefile
860    examples/zoo/cloud/Makefile
861    examples/zoo/cloud/matlab/Makefile
862    examples/zoo/curve/Makefile
[1938]863    examples/zoo/datatable/Makefile
864    examples/zoo/datatable/matlab/Makefile
[1087]865    examples/zoo/enable/Makefile
866    examples/zoo/field/Makefile
[1903]867    examples/zoo/filechoice/Makefile
[1087]868    examples/zoo/group/Makefile
869    examples/zoo/image/Makefile
870    examples/zoo/image/docs/Makefile
871    examples/zoo/image/examples/Makefile
872    examples/zoo/integer/Makefile
873    examples/zoo/integer2/Makefile
874    examples/zoo/loader/Makefile
875    examples/zoo/loader/examples/Makefile
[1218]876    examples/zoo/loadrun/Makefile
[1087]877    examples/zoo/log/Makefile
878    examples/zoo/note/Makefile
879    examples/zoo/note/docs/Makefile
880    examples/zoo/number/Makefile
881    examples/zoo/number2/Makefile
[1631]882    examples/zoo/periodicelement/Makefile
[1958]883    examples/zoo/parallelepiped/Makefile
[1087]884    examples/zoo/phase/Makefile
885    examples/zoo/sequence/Makefile
886    examples/zoo/sequence/examples/Makefile
887    examples/zoo/string/Makefile
888    examples/zoo/structure/Makefile
889    examples/zoo/structure/examples/Makefile
890    examples/zoo/table/Makefile
[1262]891    examples/zoo/unirect2d/Makefile
[1087]892    test/Makefile
893    test/src/Makefile
[1018]894])
[1270]895AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.