2
# @@PNAME@@ @@PMAJORV@@.@@PMINORV@@
4
# Copyright (c) @@YEAR@@ @@PORG@@
6
# Generated by @@CRITCL@@
9
AC_INIT([@@PNAME@@],[@@PMAJORV@@.@@PMINORV@@])
13
AC_CONFIG_AUX_DIR(tclconfig)
15
#--------------------------------------------------------------------
16
# Configure script for package '@@PNAME@@'.
18
#--------------------------------------------------------------------
20
#--------------------------------------------------------------------
21
# Load the tclConfig.sh file
22
#--------------------------------------------------------------------
27
#-----------------------------------------------------------------------
32
TEA_PUBLIC_TCL_HEADERS
33
#TEA_PRIVATE_TCL_HEADERS
38
AC_DEFINE(USE_TCL_STUBS)
43
#-----------------------------------------------------------------------
44
## Convert the TEA settings determined by the macros in the last
45
## section into something critcl can use throughts configuration.
47
AC_MSG_RESULT([critcl config: derived from core TEA])
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}])
59
#-----------------------------------------------------------------------
60
## 1. Basic/foundational translation.
62
CRITCL_CC="$(eval echo ${CC} -c ${CFLAGS})"
63
CRITCL_VERSION="${CC} -v"
64
CRITCL_LINK="$(eval echo $(eval echo ${SHLIB_LD} ${LIBS} ${MATH_LIBS}))"
65
CRITCL_PLATFORM="$(${TCLSH_PROG} ${srcdir}/critcl/main.tcl -showtarget)"
68
CRITCL_CC_OUTPUT="-o [[list \$outfile]]"
71
if test "${GCC}" = "yes"
73
CRITCL_CPP_DEFINE="${CPP} -dM"
75
CRITCL_CPP_DEFINE="${CPP}"
77
if test "${TEA_PLATFORM}" = "windows"
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
86
CRITCL_LD_DBG="$CRITCL_LD_DBG -nodefaultlib:libc"
90
CRITCL_CPP_ENUM="${CPP}"
92
#-----------------------------------------------------------------------
93
## 2. Fine tuning the commands, this now is platform specific.
97
AC_MSG_RESULT([critcl config: darwin specific tune-up])
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
104
# - A version 0.0 as pulled from TEA package version is not
105
# liked by the Darwin gcc either (Example: crimp).
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')"
116
#-----------------------------------------------------------------------
117
## Conversion results
119
AC_MSG_RESULT([critcl config: platform.......... $CRITCL_PLATFORM])
120
AC_MSG_RESULT([critcl config: compile........... $CRITCL_CC])
121
AC_MSG_RESULT([critcl config: link.............. $CRITCL_LINK])
122
AC_MSG_RESULT([critcl config: cpp define........ $CRITCL_CPP_DEFINE])
123
AC_MSG_RESULT([critcl config: cpp enum.......... $CRITCL_CPP_ENUM])
124
AC_MSG_RESULT([critcl config: version inquiry... $CRITCL_VERSION])
125
AC_MSG_RESULT([critcl config: cc output......... $CRITCL_CC_OUTPUT])
126
AC_MSG_RESULT([critcl config: ld output......... $CRITCL_LD_OUTPUT])
127
AC_MSG_RESULT([critcl config: ld debug.......... $CRITCL_LD_DBG])
128
AC_MSG_RESULT([critcl config: ld release........ $CRITCL_LD_REL])
130
#-----------------------------------------------------------------------
133
AC_SUBST(CRITCL_VERSION)
134
AC_SUBST(CRITCL_LINK)
135
AC_SUBST(CRITCL_PLATFORM)
136
AC_SUBST(CRITCL_CPP_DEFINE)
137
AC_SUBST(CRITCL_CPP_ENUM)
138
AC_SUBST(CRITCL_CC_OUTPUT)
139
AC_SUBST(CRITCL_LD_OUTPUT)
140
AC_SUBST(CRITCL_LD_DBG)
141
AC_SUBST(CRITCL_LD_REL)
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
#--------------------------------------------------------------------
151
AC_OUTPUT([Makefile Config])