AC_INIT([RapptureGUI],[1.5],[rappture@nanohub.org]) AC_CONFIG_AUX_DIR(cf) #------------------------------------------------------------------------ # 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_CANONICAL_TARGET 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 AC_PROG_CC #SC_CONFIG_CFLAGS #SC_ENABLE_SHARED gui_with_tcl="" 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) with_tclsh="yes" AC_ARG_WITH( [tclsh], [AS_HELP_STRING([--with-tclsh[=DIR]], [location of tclsh @<:@default=yes@:>@])], [], [with_tclsh=yes]) TCLSH= # ----------------------------------------------------------------------- # # Find the Tcl build configuration file "tclConfig.sh" # # ----------------------------------------------------------------------- AC_MSG_CHECKING([for tclConfig.sh]) tcl_config_sh="" if test "x$gui_with_tcl" != "x" ; then # Verify that a tclConfig.sh file exists in the directory specified # by --with-tcl. for dir in \ $gui_with_tcl do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then tcl_config_sh="$dir/lib/tclConfig.sh" break fi done else # Otherwise, search for Tcl configuration file. # 1. Search previously named locations. for dir in \ $prefix \ $exec_prefix \ $gui_cv_tcl_lib do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then tcl_config_sh="$dir/lib/tclConfig.sh" break fi done fi AC_MSG_RESULT([${tcl_config_sh}]) if test "x$tcl_config_sh" = "x" ; then echo "can't find Tcl configuration script \"tclConfig.sh\"" exit 1 fi . ${tcl_config_sh} TCL_INC_SPEC="$TCL_INCLUDE_SPEC" case $target in *-*-cygwin*|*-*-mingw*) gui_platform="win" TCLSH=${TCL_PREFIX}/bin/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION} ;; *-*-darwin*) gui_platform="macosx" TCLSH=${TCL_PREFIX}/bin/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} ;; *) blt_platform="unix" TCLSH=${TCL_PREFIX}/bin/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} ;; esac AC_MSG_RESULT([${TCLSH}]) AC_SUBST(TCLSH) 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 AC_SUBST(TCL_INC_SPEC) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_VERSION) AC_SUBST(TK_INC_SPEC) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_XLIBSW) AC_SUBST(TK_VERSION) AC_SUBST(TCL_CFLAGS_DEBUG) AC_SUBST(TCL_CFLAGS_OPTIMIZE) AC_SUBST(TCL_STLIB_LD) AC_SUBST(TCL_SHLIB_LD) AC_SUBST(TCL_SHLIB_CFLAGS) AC_SUBST(TCL_SHLIB_LDFLAGS) AC_SUBST(TCL_SHLIB_SUFFIX) AC_CONFIG_FILES([ Makefile pkgIndex.tcl apps/Makefile apps/about apps/encodedata apps/rappture apps/rappture-csh.env apps/rappture.env apps/rappture.use apps/rerun apps/simsim apps/xmldiff scripts/Makefile src/Makefile ]) AC_OUTPUT