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) with_tclsh=yes #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ if test "${prefix}" = "NONE"; then prefix=/usr/local fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi AC_ARG_WITH( [install], [AS_HELP_STRING([--with-install[=DIR]], [location of installation @<:@default=yes@:>@])], [], [with_install=yes]) if test "$with_install" != "yes"; then INSTALL_PREFIX=$with_install else INSTALL_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_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 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_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 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 AC_ARG_WITH( [ffmpeg], [AS_HELP_STRING([--with-ffmpeg[=DIR]], [location of ffmpeg @<:@default=yes@:>@])], [], [with_ffmpeg=yes]) AC_ARG_WITH( [tclsh], [AS_HELP_STRING([--with-tclsh[=DIR]], [location of tclsh @<:@default=yes@:>@])], [], [with_tclsh=yes]) TCLSH="" if test "${with_tclsh}" != "no" ; then tclsh="tclsh${TCL_VERSION}" if test "${with_tclsh}" = "yes" ; then AC_PATH_PROG(TCLSH, ${tclsh}, [], [${exec_prefix}/bin:${PATH}]) else AC_PATH_PROG(TCLSH, ${tclsh}, [], [${with_tclsh}/bin:${with_tclsh}]) fi if test "x${TCLSH}" = "x" ; then AC_ERROR([can't find tclsh]) fi fi TCL_INC_SPEC="$TCL_INCLUDE_SPEC" AC_ARG_WITH( [vtk], [AS_HELP_STRING([--with-vtk[=DIR]], [location of vtk library @<:@default=yes@:>@])], [], [with_vtk=yes]) AC_MSG_CHECKING([for vtk]) VTKDIR="" if test "$with_vtk" != "no" ; then if test "$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_MSG_RESULT([$VTKDIR]) RP_LANG_MATLAB RP_LANG_OCTAVE RP_LANG_PERL RP_LANG_PYTHON RP_LANG_JAVA RUBY="" RUBY_DEV_PKG="no" AC_ARG_WITH( [ruby], [AS_HELP_STRING([--with-ruby=DIR], [location of ruby @<:@default=yes@:>@])], [], [with_ruby="yes"]) if test "${with_ruby}" != "no" ; then if test "${with_ruby}" = "yes" ; then AC_PATH_PROG(RUBY, ruby) else AC_PATH_PROG(RUBY, ruby, [], [${with_ruby}/bin:${with_ruby}]) fi fi 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 RP_BASE=`pwd` 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. #-------------------------------------------------------------------- if test -f "${exec_prefix}/lib/tclConfig.sh" ; then . ${exec_prefix}/lib/tclConfig.sh fi if test -f "${exec_prefix}/lib/tkConfig.sh" ; then . ${exec_prefix}/lib/tkConfig.sh fi # ----------------------------------------------------------------------- # # 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}" #-------------------------------------------------------------------- # 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 test "${with_ffmpeg}" != "no"; then 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]) fi fi AC_CHECK_FUNCS(img_convert) AC_CHECK_FUNCS(sws_scale) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(ENABLE_GUI) AC_SUBST(HAVE_FFMPEG_LIBS) AC_SUBST(HAVE_INTTYPES_H) AC_SUBST(HAVE_RUBY_DEVEL) AC_SUBST(INSTALL_PREFIX) AC_SUBST(JAVA) AC_SUBST(JAVAC) AC_SUBST(JAVAH) AC_SUBST(JAVA_HOME) AC_SUBST(JAVA_INC_DIR) AC_SUBST(JAVA_INC_SPEC) AC_SUBST(LIB_SEARCH_DIRS) AC_SUBST(MAKE, ${make_command}) AC_SUBST(MATLAB) AC_SUBST(MCC) AC_SUBST(MEX) AC_SUBST(MEXEXT) AC_SUBST(MEX_ARCH) AC_SUBST(MKOCTFILE2) AC_SUBST(MKOCTFILE3) AC_SUBST(OCTAVE_VERSION) AC_SUBST(OCTAVE_VERSION_MAJOR) AC_SUBST(PERL) AC_SUBST(PERL_ARCHLIB) AC_SUBST(PERL_ARCHLIBEXP) AC_SUBST(PERL_CCFLAGS) AC_SUBST(PERL_CPPFLAGS) AC_SUBST(PERL_INCLUDES) AC_SUBST(PERL_INSTALLARCHLIB) AC_SUBST(PERL_LIBSPEC) AC_SUBST(PERL_PRIVLIB) AC_SUBST(PERL_VENDORLIB) AC_SUBST(PERL_VERSION) AC_SUBST(PERL_VERSION_RV) AC_SUBST(PYTHON) AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_DISTUTILS) AC_SUBST(PYTHON_INCDIR) AC_SUBST(PYTHON_INCLUDES) AC_SUBST(PYTHON_LDFLAGS) AC_SUBST(PYTHON_LIB) AC_SUBST(PYTHON_LIBDIR) AC_SUBST(PYTHON_SITE_DIR) AC_SUBST(PYTHON_SITE_PACKAGES) AC_SUBST(PYTHON_VERSION) AC_SUBST(RP_BASE) AC_SUBST(RUBY) AC_SUBST(RUBY_PLATFORM) AC_SUBST(RUBY_VERSION_RV) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LDFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(SIZEOF_INT) AC_SUBST(SIZEOF_LONG) AC_SUBST(SIZEOF_LONG_LONG) AC_SUBST(SIZEOF_VOID_P) AC_SUBST(STLIB_LD) AC_SUBST(TCLSH) AC_SUBST(TCL_INC_SPEC) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_VERSION) AC_SUBST(TCL_VERSION) AC_SUBST(TK_INC_SPEC) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_XLIBSW) AC_SUBST(TK_VERSION) AC_SUBST(VTKDIR) AC_SUBST(XSUBPP) 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 gui/src/Makefile builder/Makefile builder/pkgIndex.tcl builder/scripts/Makefile tester/Makefile tester/pkgIndex.tcl tester/scripts/Makefile 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/octave2/Makefile examples/app-fermi/octave/octave3/Makefile examples/app-fermi/octave/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/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/datatable/Makefile examples/zoo/datatable/matlab/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/filechoice/Makefile examples/zoo/group/Makefile examples/zoo/histogram/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/parallelepiped/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 oldtest/Makefile oldtest/src/Makefile ]) AC_OUTPUT