AC_INIT([Rappture],[1.1],[rappture@nanohub.org]) dnl AC_CONFIG_HEADER(src/core/RpConfig.h) AC_CONFIG_AUX_DIR(cf) AC_CONFIG_HEADER(src/core/config.h) #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ if test "${prefix}" = "NONE"; then prefix=/usr/local fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi if test "${libdir}" != "${prefix}/lib"; then LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}" else LIB_SEARCH_DIRS="-L${libdir}" fi AC_SUBST(LIB_SEARCH_DIRS) AC_PROG_INSTALL AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LN_S AC_PROG_MKDIR_P AC_PROG_MAKE_SET # Check for C, C++, and FORTRAN AC_PROG_CC AC_PROG_CXX # Avoid g95 AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32]) AC_LANG([C]) AC_HEADER_STDC AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?)) AC_LANG([C++]) AC_CHECK_FUNCS([sysinfo]) AC_CHECK_HEADERS(sys/sysinfo.h) AC_CHECK_LIB(m, main,,AC_MSG_ERROR(librappture requires libm)) AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++)) AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?)) AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?)) dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?)) AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?)) if test "${ac_cv_header_inttypes_h}" = "yes" ; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST(HAVE_INTTYPES_H) SC_CONFIG_CFLAGS make_command="" for m in "$MAKE" make gmake gnumake ; do if test "x${m}" != "x" ; then if ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then make_command=$m; break; fi fi done if test "x${make_command}" = "x" ; then AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) fi AC_SUBST(MAKE, ${make_command}) AC_ARG_ENABLE( [gui], [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])], [], [enable_gui=yes]) ENABLE_GUI= if test "$enable_gui" != "no" ; then ENABLE_GUI="yes" fi AC_SUBST(ENABLE_GUI) rp_with_tclsh="yes" AC_ARG_WITH( [tclsh], [AS_HELP_STRING([--with-tclsh[=DIR]], [location of tclsh @<:@default=yes@:>@])], [], [rp_with_tclsh=yes]) TCLSH= if test "$rp_with_tclsh" != "no" ; then AC_MSG_CHECKING([for tclsh]) if test -x "$rp_with_tclsh/bin/tclsh" then echo Found tclsh in $rp_with_tclsh/bin/tclsh TCLSH="$rp_with_tclsh/bin/tclsh" else if test -x "$rp_with_tclsh" then echo Found tclsh in $rp_with_tclsh TCLSH="$rp_with_tclsh" else if test -x "${exec_prefix}/bin/tclsh" then echo Found tclsh in ${exec_prefix}/bin/tclsh TCLSH="${exec_prefix}/bin/tclsh" else for v in 8.4 8.5 8.6 ; do if test -x "${exec_prefix}/bin/tclsh${v}" then echo Found tclsh in ${exec_prefix}/bin/tclsh${v} TCLSH="${exec_prefix}/bin/tclsh${v}" break fi done fi fi fi if ! test -x ${TCLSH} then AC_PATH_PROG(TCLSH, tclsh) fi fi AC_MSG_RESULT([${TCLSH}]) AC_SUBST(TCLSH) TCL_VERSION="8.4" for dir in \ ${exec_prefix} \ ${exec_prefix}/lib ; do tclconfig="${dir}/tclConfig.sh" if test -f "$tclconfig" ; then . $tclconfig break fi done TCL_INC_SPEC="$TCL_INCLUDE_SPEC" if test "x$rp_with_tcllib" != "x" ; then tclconfig="${rp_with_tcllib}/tclConfig.sh" if test -f "$tclconfig" ; then . $tclconfig fi TCL_LIB_SPEC="-L${rp_with_tcllib} -ltcl${TCL_VERSION}" fi if test "x$rp_with_tclinclude" != "x" ; then TCL_INC_SPEC="-I${rp_with_tclinclude}" fi AC_SUBST(TCL_VERSION) AC_SUBST(TCL_INC_SPEC) AC_SUBST(TCL_LIB_SPEC) AC_ARG_WITH( [vtk], [AS_HELP_STRING([--with-vtk[=DIR]], [location of vtk library @<:@default=yes@:>@])], [rp_with_vtk=$withval], [rp_with_vtk=yes]) AC_MSG_CHECKING([for vtk]) VTKDIR="" if test "$rp_with_vtk" != "no" ; then if test "$rp_with_vtk" = "yes" ; then for path in \ $libdir \ $prefix/lib \ $exec_prefix/lib \ /usr/lib do for vtk in $path/vtk-* ; do if test -d "${vtk}" ; then VTKDIR=${vtk} fi done if test "x${VTKDIR}" != "x" ; then break fi done fi fi AC_SUBST(VTKDIR) AC_MSG_RESULT([$VTKDIR]) AC_ARG_WITH( [matlab], [AS_HELP_STRING([--with-matlab[=DIR]], [location of matlab and mex compiler @<:@default=yes@:>@])], [rp_with_matlab=$withval], [rp_with_matlab=yes]) MCC="" MEX="" MEX_ARCH="" MEXEXT="" MATLAB= if test "$rp_with_matlab" != "no" ; then if test "$rp_with_matlab" = "yes" ; then AC_PATH_PROG(MATLAB, matlab) else AC_PATH_PROG(MATLAB, matlab, [], [${rp_with_matlab}/bin:${rp_with_matlab}]) fi fi if test "x$MATLAB" != "x" ; then # Found matlab. May be a symlink to the real binary. Run "matlab -e" # to tell where matlab is installed. matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin # Now see if we can find "mex" or "mexext" there. AC_PATH_PROG(MEX, mex, [], [${matlab_bindir}]) AC_PATH_PROG(MEXEXT, mexext, [], [${matlab_bindir}]) # Run "mexext" to get the expected module extension for this platform. AC_MSG_CHECKING([for mex extension]) if test "x$MEXEXT" != "x" ; then MEXEXT=`$MEXEXT` else MEXEXT="mexglx" fi AC_MSG_RESULT([$MEXEXT]) AC_PATH_PROG(MCC, mcc, [], [${matlab_bindir}]) AC_MSG_CHECKING([for mcc extension]) fi AC_SUBST(MCC) AC_SUBST(MEX) AC_SUBST(MATLAB) AC_SUBST(MEX_ARCH) AC_SUBST(MEXEXT) # Standard octave search (use the installed version of octave) AC_ARG_WITH( [octave], [AS_HELP_STRING([--with-octave[=DIR]], [location of octave compiler MKOCTFILE @<:@default=yes@:>@])], [rp_with_octave=$withval], [rp_with_octave=yes]) OCTAVE= OCTAVE2= OCTAVE3= OCTAVE_VERSION= OCTAVE_VERSION_MAJOR= MKOCTFILE= MKOCTFILE2= MKOCTFILE3= if test "$rp_with_octave" != "no" ; then AC_MSG_CHECKING([for octave and mkoctfile]) if test "$rp_with_octave" = "yes" ; then AC_PATH_PROG(OCTAVE, octave) AC_PATH_PROG(MKOCTFILE, mkoctfile) else MKOCTFILE=$rp_with_octave OCTAVE=$rp_with_octave fi fi if test "x${OCTAVE}" != "x" ; then OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4` OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1` if test "${OCTAVE_VERSION_MAJOR}" == "3" ; then OCTAVE3=$OCTAVE MKOCTFILE3=$MKOCTFILE fi if test "${OCTAVE_VERSION_MAJOR}" == "2" ; then OCTAVE2=$OCTAVE MKOCTFILE2=$MKOCTFILE fi fi # Check if octave2 was designated *in addition* to the installed version. AC_ARG_WITH( [octave2], [AS_HELP_STRING([--with-octave2[=DIR]], [location of octave compiler MKOCTFILE @<:@default=no@:>@])], [rp_with_octave2=$withval], [rp_with_octave2=no]) if test "$rp_with_octave2" != "no" ; then if test "$rp_with_octave2" = "yes" ; then AC_MSG_CHECKING([for octave and mkoctfile]) AC_PATH_PROG(octave2, octave) AC_PATH_PROG(mkoctfile2, mkoctfile) else octave2=$rp_with_octave2 mkoctfile2=`dirname $rp_with_octave2`/mkoctfile fi fi if test "x${octave2}" != "x" ; then version=`${octave2} -v | grep version | cut -d' ' -f4` version_major=`echo ${version} | cut -d'.' -f1` if test "$version_major" = "2" ; then OCTAVE2=$octave2 MKOCTFILE2=$mkoctfile2 fi fi # Check if octave3 was designated *in addition* to the installed version. AC_ARG_WITH( [octave3], [AS_HELP_STRING([--with-octave3[=DIR]], [location of octave compiler MKOCTFILE @<:@default=no@:>@])], [rp_with_octave3=$withval], [rp_with_octave3=no]) echo rp_with_octave3=$rp_with_octave3 if test "$rp_with_octave3" != "no" ; then if test "$rp_with_octave3" = "yes" ; then AC_MSG_CHECKING([for octave and mkoctfile]) AC_PATH_PROG(octave3, octave) AC_PATH_PROG(mkoctfile3, mkoctfile) else octave3=$rp_with_octave3 mkoctfile3=`dirname $rp_with_octave3`/mkoctfile fi fi echo octave3=$octave3 if test "x${octave3}" != "x" ; then echo version="${octave3} -v | grep version | cut -d' ' -f4" version=`${octave3} -v | grep version | cut -d' ' -f4` echo version=$version version_major=`echo ${version} | cut -d'.' -f1` echo version_major=$version_major if test "$version_major" = "3" ; then OCTAVE3=$rp_with_octave3 MKOCTFILE3=$mkoctfile3 fi fi AC_SUBST(OCTAVE2) AC_SUBST(OCTAVE3) AC_SUBST(OCTAVE) AC_SUBST(OCTAVE_VERSION) AC_SUBST(OCTAVE_VERSION_MAJOR) AC_SUBST(MKOCTFILE) AC_SUBST(MKOCTFILE2) AC_SUBST(MKOCTFILE3) AC_ARG_WITH( [perl], [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])], [], [rp_with_perl=yes]) PERL= PERL_INCLUDES= PERL_ARCHLIB= PERL_ARCHLIBEXP= PERL_VERSION= PERL_VENDORLIB= PERL_PRIVLIB= PERL_CPPFLAGS= PERL_CCFlAGS= PERL_VERSION_RV= PERL_LIBSPEC= if test "$rp_with_perl" != "no" ; then AC_MSG_CHECKING([for perl]) if test "$rp_with_perl" != "yes" ; then AC_PATH_PROG(PERL, perl, [], [$rp_with_perl/bin:$rp_with_perl]) else AC_PATH_PROG(PERL, perl) fi if test "x${PERL}" != "x" ; then PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'` PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'` PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'` PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'` PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'` PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'` PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'` PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'` PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2` echo perllib="${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" # libperl may or may not be installed. Check for its existence. if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl" fi fi fi AC_MSG_RESULT([${PERL}]) AC_SUBST(PERL) AC_SUBST(PERL_INCLUDES) AC_SUBST(PERL_ARCHLIB) AC_SUBST(PERL_ARCHLIBEXP) AC_SUBST(PERL_VERSION) AC_SUBST(PERL_CCFLAGS) AC_SUBST(PERL_CPPFLAGS) AC_SUBST(PERL_VENDORLIB) AC_SUBST(PERL_PRIVLIB) AC_SUBST(PERL_INSTALLARCHLIB) AC_SUBST(PERL_VERSION_RV) AC_SUBST(PERL_LIBSPEC) PYTHON="" PYTHON_CFLAGS="" PYTHON_CPPFLAGS="" HAVE_PYTHON_DISTUTILS="" PYTHON_INCLUDES="" PYTHON_LDFLAGS="" PYTHON_LIB="" PYTHON_LIBDIR="" PYTHON_SITE_DIR="" PYTHON_SITE_PACKAGES="" PYTHON_VERSION="" pythondir="" AC_ARG_WITH([python], [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=yes@:>@])], [], [rp_with_python=yes]) if test "$rp_with_python" != "no" ; then AC_MSG_CHECKING([for python]) if test -x "$rp_with_python/bin/python"; then echo Found python in $rp_with_python/bin/python PYTHON="$rp_with_python/bin/python" elif test -x "$rp_with_python"; then echo Found python in $rp_with_python PYTHON="$rp_with_python" else AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) fi if test "x${PYTHON}" != "x"; then PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` echo Using python version $PYTHON_VERSION fi if test "x${PYTHON_VERSION}" != "x"; then if test -r $rp_with_python/include/python$PYTHON_VERSION/Python.h -a \ -d $rp_with_python/lib/python$PYTHON_VERSION/site-packages; then PYTHON_INCLUDES=$rp_with_python/include/python$PYTHON_VERSION PYTHON_SITE_PACKAGES=$rp_with_python/lib/python$PYTHON_VERSION/site-packages else if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' else if test -r /usr/include/python$PYTHON_VERSION/Python.h; then PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' else echo could not find python$PYTHON_VERSION/Python.h fi fi if test ! -d "$PYTHON_SITE_PACKAGES"; then PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` fi fi fi if test "x$rp_with_python" != "x" ; then pythondir='$(PYTHON_SITE_PACKAGES)' else pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages' fi AC_MSG_CHECKING([for python distutils]) ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \ build build_ext 2>&1 > /dev/null if test $? = 0 ; then HAVE_PYTHON_DISTUTILS="yes" else HAVE_PYTHON_DISTUTILS="no" fi AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS]) if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then # # Check for Python include path # AC_MSG_CHECKING([for Python include path]) if test "x${PYTHON_CPPFLAGS}" = "x"; then incdir_path=`${PYTHON} -c "import distutils.sysconfig; \ print distutils.sysconfig.get_python_inc();"` if test -n "${incdir}"; then python_path="-I${incdir}" fi PYTHON_CPPFLAGS=$python_path fi AC_MSG_RESULT([$PYTHON_CPPFLAGS]) AC_SUBST([PYTHON_CPPFLAGS]) # # python distutils found, get settings from python directly # AC_MSG_CHECKING([location of site-packages]) PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`" 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);'`" 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);'`" PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`" PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`" fi fi AC_SUBST(pythondir) AC_SUBST(PYTHON) AC_SUBST(PYTHON_VERSION) AC_SUBST(PYTHON_INCLUDES) AC_SUBST(PYTHON_SITE_PACKAGES) AC_SUBST(HAVE_PYTHON_DISTUTILS) rp_with_ruby="yes" RUBY="" RUBY_DEV_PKG="no" AC_ARG_WITH(ruby, AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]), [rp_with_ruby=$withval]) if test "${rp_with_ruby}" != "no" ; then if test "${rp_with_ruby}" = "yes" ; then AC_PATH_PROG(RUBY, ruby) else AC_PATH_PROG(RUBY, ruby, [], [${rp_with_ruby}/bin:${rp_with_ruby}]) fi fi AC_SUBST(RUBY) RUBY_VERSION_RV= RUBY_PLATFORM= if test "x${RUBY}" != "x" ; then AX_PROG_RUBY_VERSION RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2` RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'` ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1` if test -z "$ac_mkmf_result"; then HAVE_RUBY_DEVEL="yes" AX_RUBY_DEV_FLAGS([${RUBY}]) fi fi AC_SUBST(HAVE_RUBY_DEVEL) AC_SUBST(RUBY_VERSION_RV) AC_SUBST(RUBY_PLATFORM) rp_with_java="yes" JAVA="" JAVAH="" JAVAC="" JAVA_DEV_PKG="no" AC_ARG_WITH(java, AS_HELP_STRING([--with-java=PATH], [absolute path to java executable]), [rp_with_java=$withval]) if test "${rp_with_java}" != "no" ; then if test "${rp_with_java}" = "yes" ; then AC_PATH_PROG(JAVA, java) AC_PATH_PROG(JAVAC, javac) AC_PATH_PROG(JAVAH, javah) else AC_PATH_PROG(JAVA, java, [], [${rp_with_java}/bin:${rp_with_java}]) AC_PATH_PROG(JAVAC, javac, [], [${rp_with_java}/bin:${rp_with_java}]) AC_PATH_PROG(JAVAH, javah, [], [${rp_with_java}/bin:${rp_with_java}]) fi fi JDK= JAVA_HOME= JAVA_INC_DIR= JAVA_INC_SPEC= # If java exists, let's look for the jni.h file. if test "x${JAVA}" != "x" ; then for d in \ /apps/java/jdk1.6.0_01 \ /usr/lib/jvm/*sun-1.6* \ /opt/sun-jdk-1.6* \ /opt/icedtea6-* \ /opt/sun-jdk-1.5* \ /usr/lib/jvm/*sun-1.5* do if test -r "${d}/include/jni.h" ; then JDK=${d} break; fi done JAVA_HOME=$JDK JAVA_INC_DIR=${JDK}/include JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux" fi AC_SUBST(JAVA) AC_SUBST(JAVAC) AC_SUBST(JAVAH) AC_SUBST(JAVA_HOME) AC_SUBST(JAVA_INC_DIR) AC_SUBST(JAVA_INC_SPEC) RP_BASE=`pwd` AC_SUBST(RP_BASE) SC_ENABLE_SHARED #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information # is all taken from the tclConfig.sh file. #-------------------------------------------------------------------- AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_LDFLAGS) AC_SUBST(SHLIB_SUFFIX) if test -f "${exec_prefix}/lib/tclConfig.sh" ; then . ${exec_prefix}/lib/tclConfig.sh fi if test -f "${exec_prefix}/lib/tclConfig.sh" ; then . ${exec_prefix}/lib/tkConfig.sh fi AC_SUBST(TCL_VERSION) AC_SUBST(TK_VERSION) # ----------------------------------------------------------------------- # # Compiler characteristics: # Check for existence of types of size_t and pid_t # # ----------------------------------------------------------------------- AC_C_BIGENDIAN AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(void *) SIZEOF_LONG="${ac_cv_sizeof_long}" SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" SIZEOF_INT="${ac_cv_sizeof_int}" AC_SUBST(SIZEOF_INT) AC_SUBST(SIZEOF_LONG) AC_SUBST(SIZEOF_LONG_LONG) AC_SUBST(SIZEOF_VOID_P) #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. #-------------------------------------------------------------------- SC_ENABLE_SYMBOLS #-------------------------------------------------------------------- # search for ffmpeg libraries libavcodec, libavformat, libswscale #-------------------------------------------------------------------- AC_CHECK_HEADERS(ffmpeg/avcodec.h,[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_FFMPEG_AVCODEC_H # include #endif ]]) AC_CHECK_HEADERS(libavcodec/avcodec.h,[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_LIBAVCODEC_AVCODEC_H # include #endif ]]) AC_CHECK_HEADERS([ffmpeg/avformat.h],[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_FFMPEG_AVFORMAT_H # include #endif ]]) AC_CHECK_HEADERS([libavformat/avformat.h],[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H # include #endif ]]) AC_CHECK_HEADERS([ffmpeg/avutil.h],[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_FFMPEG_AVUTIL_H # include #endif ]]) AC_CHECK_HEADERS([libavutil/avutil.h],[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_LIBAVUTIL_AVUTIL_H # include #endif ]]) AC_CHECK_HEADERS([ffmpeg/swscale.h],[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_FFMPEG_SWSCALE_H # include #endif ]]) AC_CHECK_HEADERS([libswscale/swscale.h],[],[], [[#define __STDC_CONSTANT_MACROS 1 #ifdef HAVE_LIBSWSCALE_SWSCALE_H # include #endif ]]) HAVE_FFMPEG_LIBS="" if [[ \( "${ac_cv_header_ffmpeg_avcodec_h}" = "yes" -o \ "${ac_cv_header_libavcodec_avcodec_h}" = "yes" \) -a \ \( "${ac_cv_header_ffmpeg_avformat_h}" = "yes" -o \ "${ac_cv_header_libavformat_avformat_h}" = "yes" \) -a \ \( "${ac_cv_header_ffmpeg_avutil_h}" = "yes" -o \ "${ac_cv_header_libavutil_avutil_h}" = "yes" \) -a \ \( "${ac_cv_header_ffmpeg_swscale_h}" = "yes" -o \ "${ac_cv_header_libswscale_swscale_h}" = "yes" \) ]] ; then HAVE_FFMPEG_LIBS="yes" AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets]) else HAVE_FFMPEG_LIBS="" fi AC_CHECK_FUNCS(img_convert) AC_CHECK_FUNCS(sws_scale) AC_SUBST(HAVE_FFMPEG_LIBS) ac_configure_args="--disable-threads --enable-shared" AC_CONFIG_SUBDIRS( [packages/optimizer/src] ) dnl read Makefile.in and write Makefile AC_CONFIG_FILES([ Makefile packages/Makefile src/Makefile src/core/Makefile src/core2/Makefile src/objects/Makefile src/objects/RpHash.h gui/Makefile gui/apps/Makefile gui/apps/about gui/apps/encodedata gui/apps/rappture gui/apps/rappture-csh.env gui/apps/rappture.env gui/apps/rappture.use gui/apps/rerun gui/apps/simsim gui/apps/xmldiff gui/pkgIndex.tcl gui/scripts/Makefile instant/Makefile instant/irappture lang/Makefile lang/java/Makefile lang/java/rappture/Makefile lang/perl/Makefile lang/perl/Makefile.PL lang/python/Makefile lang/python/setup.py lang/matlab/Makefile lang/octave/Makefile lang/octave/octave2/Makefile lang/octave/octave3/Makefile lang/ruby/Makefile lang/ruby/build.rb lang/tcl/Makefile lang/tcl/pkgIndex.tcl lang/tcl/src/Makefile lang/tcl/scripts/Makefile lang/tcl/tests/Makefile lib/Makefile examples/3D/Makefile examples/Makefile examples/app-fermi/2.0/Makefile examples/app-fermi/Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/java/Makefile examples/app-fermi/matlab/Makefile examples/app-fermi/matlab/compiled/Makefile examples/app-fermi/matlab/uncompiled/Makefile examples/app-fermi/octave/Makefile examples/app-fermi/octave/2/Makefile examples/app-fermi/octave/3/Makefile examples/app-fermi/perl/Makefile examples/app-fermi/python/Makefile examples/app-fermi/ruby/Makefile examples/app-fermi/tcl/Makefile examples/app-fermi/wrapper/Makefile examples/app-fermi/wrapper/cee/Makefile examples/app-fermi/wrapper/perl/Makefile examples/app-fermi/wrapper/python/Makefile examples/app-fermi/wrapper/tcl/Makefile examples/c-example/Makefile examples/canvas/Makefile examples/demo.bash examples/flow/Makefile examples/flow/demo1/Makefile examples/flow/demo2/Makefile examples/flow/demo3/Makefile examples/graph/Makefile examples/objects/Makefile examples/objects/axis/Makefile examples/objects/contour/Makefile examples/objects/curve/Makefile examples/objects/dxWriter/Makefile examples/objects/floatBuffer/Makefile examples/objects/histogram/Makefile examples/objects/library/Makefile examples/objects/number/Makefile examples/objects/path/Makefile examples/objects/plot/Makefile examples/objects/scatter/Makefile examples/objects/string/Makefile examples/objects/tree/Makefile examples/objects/xmlparser/Makefile examples/zoo/Makefile examples/zoo/binary/Makefile examples/zoo/boolean/Makefile examples/zoo/parallelepiped/Makefile examples/zoo/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/group/Makefile examples/zoo/image/Makefile examples/zoo/image/docs/Makefile examples/zoo/image/examples/Makefile examples/zoo/integer/Makefile examples/zoo/integer2/Makefile examples/zoo/loader/Makefile examples/zoo/loader/examples/Makefile examples/zoo/loadrun/Makefile examples/zoo/log/Makefile examples/zoo/note/Makefile examples/zoo/note/docs/Makefile examples/zoo/number/Makefile examples/zoo/number2/Makefile examples/zoo/periodicelement/Makefile examples/zoo/phase/Makefile examples/zoo/sequence/Makefile examples/zoo/sequence/examples/Makefile examples/zoo/string/Makefile examples/zoo/structure/Makefile examples/zoo/structure/examples/Makefile examples/zoo/table/Makefile examples/zoo/unirect2d/Makefile test/Makefile test/src/Makefile ]) AC_OUTPUT