Debian Codegraph @

lib/app-critcl/tea/configure.in

raw
1 # Configure for
2 # @@PNAME@@ @@PMAJORV@@.@@PMINORV@@
3 #
4 # Copyright (c) @@YEAR@@ @@PORG@@
5 #
6 # Generated by @@CRITCL@@
7 # At @@NOW@@
8
9 AC_INIT([@@PNAME@@],[@@PMAJORV@@.@@PMINORV@@])
10
11 TEA_INIT([3.9])
12
13 AC_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
24 TEA_PATH_TCLCONFIG
25 TEA_LOAD_TCLCONFIG
26
27 #-----------------------------------------------------------------------
28 ## Std TEA setup
29
30 TEA_PREFIX
31 TEA_SETUP_COMPILER
32 TEA_PUBLIC_TCL_HEADERS
33 #TEA_PRIVATE_TCL_HEADERS
34 TEA_ENABLE_THREADS
35 TEA_ENABLE_SHARED
36 TEA_CONFIG_CFLAGS
37 TEA_ENABLE_SYMBOLS
38 AC_DEFINE(USE_TCL_STUBS)
39 TEA_MAKE_LIB
40 TEA_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
47 AC_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
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)"
66 CRITCL_LD_DBG=""
67 CRITCL_LD_REL=""
68 CRITCL_CC_OUTPUT="-o [[list \$outfile]]"
69 CRITCL_LD_OUTPUT=""
70
71 if test "${GCC}" = "yes"
72 then
73 CRITCL_CPP_DEFINE="${CPP} -dM"
74 else
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
89 fi
90 CRITCL_CPP_ENUM="${CPP}"
91
92 #-----------------------------------------------------------------------
93 ## 2. Fine tuning the commands, this now is platform specific.
94
95 case $(uname -s) in
96 Darwin*)
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 ;;
114 esac
115
116 #-----------------------------------------------------------------------
117 ## Conversion results
118
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])
129
130 #-----------------------------------------------------------------------
131
132 AC_SUBST(CRITCL_CC)
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)
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
151 AC_OUTPUT([Makefile Config])