]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/configure.in
Security-54.1.tar.gz
[apple/security.git] / SecuritySNACCRuntime / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl ---
3 AC_REVISION($Revision: 1.1.1.1 $)dnl
4 dnl $Log: configure.in,v $
5 dnl Revision 1.1.1.1 2001/05/18 23:14:04 mb
6 dnl Move from private repository to open source repository
7 dnl
8 dnl Revision 1.3 2000/12/21 23:58:39 dmitch
9 dnl Misc. updates for clean build on Cheetah 1D7.
10 dnl
11 dnl Revision 1.2 2000/06/08 19:57:33 dmitch
12 dnl Mods for X port.
13 dnl
14 dnl Revision 1.1.1.1 1999/03/16 18:05:49 aram
15 dnl Originals from SMIME Free Library.
16 dnl
17 dnl Revision 1.13 1997/09/04 13:54:04 wan
18 dnl A little more portability
19 dnl
20 dnl Revision 1.12 1997/02/28 13:39:35 wan
21 dnl Modifications collected for new version 1.3: Bug fixes, tk4.2.
22 dnl
23 dnl Revision 1.11 1997/02/16 16:50:27 rj
24 dnl made return *this after calling abort()'' a compile time option.
25 dnl
26 dnl Revision 1.10 1997/02/15 20:06:27 rj
27 dnl adjust to changed AC_TRY_COMPILE macro
28 dnl
29 dnl Revision 1.9 1997/02/15 20:01:38 rj
30 dnl check whether the compiler supports volatile functions (and whether abort() is volatile).
31 dnl
32 dnl Revision 1.8 1997/01/01 19:57:01 rj
33 dnl changes for autoconf version 2.12
34 dnl
35 dnl Revision 1.7 1995/09/07 18:36:47 rj
36 dnl psbook and psnup are looked for (used by .../doc/makefile)
37 dnl
38 dnl Revision 1.6 1995/07/24 14:44:47 rj
39 dnl don't use gcc/g++ with -pipe, compiling some files may exceed virtual memory.
40 dnl
41 dnl look for tclsh(1). tcl-lib uses it to construct the tclIndex file. don't look for Tcl/Tk if the tclsh is absent.
42 dnl
43 dnl look for patch(1). the c-lib uses it to patch tbl.h.
44 dnl
45 dnl search for tree-3.6's libtktree.a and set TREELIBS in .../makehead accordingly.
46 dnl
47 dnl check for memset(3), memcpy(3) and memcmp(3). .../snacc.h reverts to bzero(3), bcopy(3) and bcmp(3) if necessary.
48 dnl
49 dnl Revision 1.5 1995/02/20 11:18:41 rj
50 dnl cpp switch HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS added.
51 dnl check for isinf(3) and finite(3) added.
52 dnl
53 dnl Revision 1.4 1995/02/17 15:15:44 rj
54 dnl hack to let makedepend find .h files the way gcc does.
55 dnl
56 dnl Revision 1.3 1995/02/17 14:26:40 rj
57 dnl adjustments for autoconf 2.x
58 dnl
59 dnl Revision 1.2 1994/10/08 04:29:37 rj
60 dnl search for Tcl/Tk
61 dnl
62 dnl Revision 1.1 1994/09/01 00:51:22 rj
63 dnl first check-in (new file).
64 dnl
65 AC_INIT( compiler/core/snacc.c)
66 AC_CONFIG_HEADER( config.h)
67 dnl --- alternative programs:
68 AC_PROG_MAKE_SET
69 AC_PROG_CC
70 AC_ISC_POSIX
71 if test -n "$GCC"; then
72 dnl saveCC="$CC"
73 dnl CC="$CC -pipe"
74 dnl AC_MSG_CHECKING( whether $saveCC takes -pipe)
75 dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no); CC="$saveCC"])
76
77 # hack to let X11 makedepend find .h file a little more the way gcc does:
78 AC_MSG_CHECKING( for $CC's include path)
79 gcclibdir=`$CC -v 2>&1 | sed -n -e 's:Reading specs from \(.*\)/specs:\1:p'`
80 gxxincdir=`which gcc | sed "s/bin\/gcc//"`
81 #MKDEP_CCINC="-I$gxxincdir/lib/g++-include -I/usr/local/include -I$gcclibdir/include"
82 MKDEP_CCINC="-I/usr/local/include -I$gcclibdir/include -F/System/Library/PrivateFrameworks"
83 AC_MSG_RESULT( $MKDEP_CCINC)
84 AC_SUBST( MKDEP_CCINC)
85 fi
86 AC_PROG_GCC_TRADITIONAL
87 AC_PROG_CC_C_O
88 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
89 AC_MSG_WARN( since -c and -o don't seem to work together, the makefiles probably won't work!)
90 fi
91 AC_MSG_CHECKING( whether ANSI or K&R style C)
92 AC_TRY_RUN( [main (int argc, char **argv) { void *p; return 0; }], [AC_MSG_RESULT( ANSI); AC_DEFINE( __USE_ANSI_C__)], AC_MSG_RESULT( K&R), AC_MSG_RESULT( K&R))
93 AC_PROG_CXX
94 AC_LANG_CPLUSPLUS
95 dnl if test -n "$GCC"; then
96 dnl saveCXX="$CXX"
97 dnl CXX="$CXX -pipe"
98 dnl AC_MSG_CHECKING( whether $saveCXX takes -pipe)
99 dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no);CC="$saveCC"])
100 dnl fi
101 AC_MSG_CHECKING( for bool built-in)
102 AC_TRY_COMPILE( , bool b = false;, [AC_DEFINE( BOOL_BUILTIN) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
103 AC_MSG_CHECKING( for variable sized automatic arrays)
104 AC_TRY_COMPILE( , changequote(<,>)int i = 42; char a[++i]; *a = i;changequote([,]), [AC_DEFINE( HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
105 AC_MSG_CHECKING( for volatile functions)
106 AC_TRY_COMPILE( , changequote(<,>)abort();changequote([,]), [AC_MSG_RESULT( yes)], [AC_DEFINE( COMPILER_WITHOUT_VOLATILE_FUNCTIONS) SNACC_NOVOLAT=-novolat; AC_SUBST( SNACC_NOVOLAT) AC_MSG_RESULT( no)])
107 AC_LANG_C
108 AC_PROG_LEX
109 AC_DECL_YYTEXT
110 case "$LEX" in
111 lex)
112 LFLAGS="-Nc10000"
113 ;;
114 flex)
115 CFLAGS="$CFLAGS -DFLEX_IN_USE"
116 esac
117 AC_SUBST( LFLAGS)
118 AC_SUBST( CFLAGS)
119 # the boot strapping code in .../c-lib/ needs patch:
120 AC_CHECK_PROGS( PATCH, patch, false)
121 AC_PROG_YACC
122 AC_CHECK_PROGS( MKDEP, makedepend mkdep mkdep.sh, $CC)
123 AC_CHECK_PROGS( AR, ar, ar)
124 AC_PROG_RANLIB
125 AC_PROG_INSTALL
126 dnl --- header files:
127 AC_HEADER_TIME
128 AC_HEADER_DIRENT
129 AC_TYPE_SIZE_T
130 AC_TYPE_UID_T
131 AC_HEADER_STDC
132 AC_CHECK_HEADERS( unistd.h memory.h string.h malloc.h fcntl.h)
133 AC_FUNC_VPRINTF
134 dnl --- system and compiler characteristics:
135 AC_C_CONST
136 AC_C_BIGENDIAN
137 AC_CHECK_SIZEOF( short)
138 AC_CHECK_SIZEOF( int)
139 AC_CHECK_SIZEOF( long)
140 AC_CHECK_SIZEOF( double)
141 AC_CHECK_LIB( m, sin)
142 AC_CHECK_FUNCS( isinf finite)
143 AC_CHECK_FUNCS( memset memcpy memcmp)
144 dnl ---
145 AC_PATH_X
146 AC_PATH_XTRA
147 AC_CHECK_PROGS( TCLSH, tclsh, false)
148 if test "$TCLSH" != false; then
149 AC_CHECK_HEADER(
150 tcl.h,
151 [AC_CHECK_LIB( ld, ldopen, TCLOTHERLIBS=-lld)
152 AC_CHECK_LIB(
153 tcl,
154 Tcl_CreateInterp,
155 [saveCFLAGS="$CFLAGS"
156 CFLAGS="$CFLAGS $X_CFLAGS"
157 AC_CHECK_LIB(
158 tk,
159 Tk_CreateWindow,
160 [AC_DEFINE( HAVE_TCL)
161 TCLLIBS="-ltk -ltcl $TCLOTHERLIBS"
162 AC_LANG_CPLUSPLUS
163 AC_CHECK_LIB(
164 TkTree,
165 Tree_Init,
166 [TREELIBS="-lTkTree"],
167 [AC_MSG_RESULT( [tcl/tk libs found, but tree widget is missing])],
168 -lTkTree -ltk -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
169 AC_LANG_C],
170 [AC_MSG_RESULT( [tcl lib found, but tk lib is missing])],
171 -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
172 CFLAGS="$saveCFLAGS"],
173 [AC_MSG_RESULT( [tcl library not found])],
174 $TCLOTHERLIBS -lm)])
175 fi
176 AC_SUBST( TCLLIBS)
177 AC_SUBST( TREELIBS)
178 dnl ---
179 AC_CHECK_PROGS( LATEX, latex, false)
180 AC_CHECK_PROGS( BIBTEX, bibtex, false)
181 AC_CHECK_PROGS( DVIPS, dvips, false)
182 AC_CHECK_PROGS( DETEX, detex2 detex, false)
183 AC_CHECK_PROGS( PSPREVIEW, ghostview gs, true)
184 AC_CHECK_PROGS( PSBOOK, psbook, false)
185 AC_CHECK_PROGS( PSNUP, psnup, false)
186 AC_CHECK_PROGS( SPELL, ispell spell, spell)
187 dnl ---
188 AC_OUTPUT( makehead, date > stamp-h)
189 dnl --- finis