1# Configure for 2# @@PNAME@@ @@PMAJORV@@.@@PMINORV@@ 3# 4# Copyright (c) @@YEAR@@ @@PORG@@ 5# 6# Generated by @@CRITCL@@ 7# At @@NOW@@ 8 9AC_INIT([@@PNAME@@],[@@PMAJORV@@.@@PMINORV@@]) 10 11TEA_INIT([3.9]) 12 13AC_CONFIG_AUX_DIR(tclconfig) 14 15#-------------------------------------------------------------------- 16# Configure script for package '@@PNAME@@'. 17# TEA compliant. 18#-------------------------------------------------------------------- 19 20#-------------------------------------------------------------------- 21# Load the tclConfig.sh file 22#-------------------------------------------------------------------- 23 24TEA_PATH_TCLCONFIG 25TEA_LOAD_TCLCONFIG 26 27#----------------------------------------------------------------------- 28## Std TEA setup 29 30TEA_PREFIX 31TEA_SETUP_COMPILER 32TEA_PUBLIC_TCL_HEADERS 33#TEA_PRIVATE_TCL_HEADERS 34TEA_ENABLE_THREADS 35TEA_ENABLE_SHARED 36TEA_CONFIG_CFLAGS 37TEA_ENABLE_SYMBOLS 38AC_DEFINE(USE_TCL_STUBS) 39TEA_MAKE_LIB 40TEA_PROG_TCLSH 41@@API@@ 42@@UCONFIG@@ 43#----------------------------------------------------------------------- 44## Convert the TEA settings determined by the macros in the last 45## section into something critcl can use throughts configuration. 46 47AC_MSG_RESULT([critcl config: derived from core TEA]) 48 49#AC_MSG_RESULT([critcl config: CC............. ${CC}]) 50#AC_MSG_RESULT([critcl config: CFLAGS......... ${CFLAGS}]) 51#AC_MSG_RESULT([critcl config: SHLIB_LD....... ${SHLIB_LD}]) 52#AC_MSG_RESULT([critcl config: LIBS........... ${LIBS}| 53#AC_MSG_RESULT([critcl config: MATH_LIBS...... ${MATH_LIBS}]) 54#AC_MSG_RESULT([critcl config: CFLAGS_DEFAULT. ${CFLAGS_DEFAULT}]) 55#AC_MSG_RESULT([critcl config: CFLAGS_WARNING. ${CFLAGS_WARNING}]) 56#AC_MSG_RESULT([critcl config: SHLIB_CFLAGS... ${SHLIB_CFLAGS}]) 57#AC_MSG_RESULT([critcl config: LDFLAGS_DEFAULT ${LDFLAGS_DEFAULT}]) 58 59#----------------------------------------------------------------------- 60## 1. Basic/foundational translation. 61 62CRITCL_CC="$(eval echo ${CC} -c ${CFLAGS})" 63CRITCL_VERSION="${CC} -v" 64CRITCL_LINK="$(eval echo $(eval echo ${SHLIB_LD} ${LIBS} ${MATH_LIBS}))" 65CRITCL_PLATFORM="$(${TCLSH_PROG} ${srcdir}/critcl/main.tcl -showtarget)" 66CRITCL_LD_DBG="" 67CRITCL_LD_REL="" 68CRITCL_CC_OUTPUT="-o [[list \$outfile]]" 69CRITCL_LD_OUTPUT="" 70 71if test "${GCC}" = "yes" 72then 73 CRITCL_CPP_DEFINE="${CPP} -dM" 74else 75 CRITCL_CPP_DEFINE="${CPP}" 76 77 if test "${TEA_PLATFORM}" = "windows" 78 then 79 # windows, no gcc => msvc 80 CRITCL_CC_OUTPUT="[[list -Fo\$outfile]]" 81 CRITCL_LD_OUTPUT="-dll [[list -out:\$outfile]]" 82 CRITCL_LD_DBG="-debug:full -debugtype:cv -verbose:lib" 83 CRITCL_LD_REL="-release -opt:ref -opt:icf,3 -ws:aggressive -verbose:lib" 84 if test "$do64bit" = "no" ; then 85 # 32bit 86 CRITCL_LD_DBG="$CRITCL_LD_DBG -nodefaultlib:libc" 87 fi 88 fi 89fi 90CRITCL_CPP_ENUM="${CPP}" 91 92#----------------------------------------------------------------------- 93## 2. Fine tuning the commands, this now is platform specific. 94 95case $(uname -s) in 96Darwin*) 97 AC_MSG_RESULT([critcl config: darwin specific tune-up]) 98 99 # - Critcl, due to essentially generating its private 100 # lib{tcl,tk}stub.a does generate common symbols for the 101 # stubs tables. Use of -fno-common then prevents linking the 102 # object files. 103 # 104 # - A version 0.0 as pulled from TEA package version is not 105 # liked by the Darwin gcc either (Example: crimp). 106 107 CRITCL_CC="$(echo "$CRITCL_CC" |sed -e 's,-fno-common,,g')" 108 CRITCL_LINK="$(echo "$CRITCL_LINK"|sed -e 's,-fno-common,,g')" 109 CRITCL_LINK="$(echo "$CRITCL_LINK"|sed -e 's,-current_version 0\.0,,g')" 110 CRITCL_LINK="$(echo "$CRITCL_LINK"|sed -e 's,-compatibility_version 0\.0,,g')" 111 ;; 112*) 113 ;; 114esac 115 116#----------------------------------------------------------------------- 117## Conversion results 118 119AC_MSG_RESULT([critcl config: platform.......... $CRITCL_PLATFORM]) 120AC_MSG_RESULT([critcl config: compile........... $CRITCL_CC]) 121AC_MSG_RESULT([critcl config: link.............. $CRITCL_LINK]) 122AC_MSG_RESULT([critcl config: cpp define........ $CRITCL_CPP_DEFINE]) 123AC_MSG_RESULT([critcl config: cpp enum.......... $CRITCL_CPP_ENUM]) 124AC_MSG_RESULT([critcl config: version inquiry... $CRITCL_VERSION]) 125AC_MSG_RESULT([critcl config: cc output......... $CRITCL_CC_OUTPUT]) 126AC_MSG_RESULT([critcl config: ld output......... $CRITCL_LD_OUTPUT]) 127AC_MSG_RESULT([critcl config: ld debug.......... $CRITCL_LD_DBG]) 128AC_MSG_RESULT([critcl config: ld release........ $CRITCL_LD_REL]) 129 130#----------------------------------------------------------------------- 131 132AC_SUBST(CRITCL_CC) 133AC_SUBST(CRITCL_VERSION) 134AC_SUBST(CRITCL_LINK) 135AC_SUBST(CRITCL_PLATFORM) 136AC_SUBST(CRITCL_CPP_DEFINE) 137AC_SUBST(CRITCL_CPP_ENUM) 138AC_SUBST(CRITCL_CC_OUTPUT) 139AC_SUBST(CRITCL_LD_OUTPUT) 140AC_SUBST(CRITCL_LD_DBG) 141AC_SUBST(CRITCL_LD_REL) 142#AC_SUBST(CRITCL_) 143#AC_SUBST() 144 145#-------------------------------------------------------------------- 146# Finally, substitute all of the various values into the Makefile. 147# You may alternatively have a special pkgIndex.tcl.in or other files 148# which require substituting th AC variables in. Include these here. 149#-------------------------------------------------------------------- 150 151AC_OUTPUT([Makefile Config]) 152