]> git.saurik.com Git - apple/security.git/blame - SecuritySNACCRuntime/configure.in
Security-54.1.9.tar.gz
[apple/security.git] / SecuritySNACCRuntime / configure.in
CommitLineData
bac41a7b
A
1dnl Process this file with autoconf to produce a configure script.
2dnl ---
3AC_REVISION($Revision: 1.1.1.1 $)dnl
4dnl $Log: configure.in,v $
5dnl Revision 1.1.1.1 2001/05/18 23:14:04 mb
6dnl Move from private repository to open source repository
7dnl
8dnl Revision 1.3 2000/12/21 23:58:39 dmitch
9dnl Misc. updates for clean build on Cheetah 1D7.
10dnl
11dnl Revision 1.2 2000/06/08 19:57:33 dmitch
12dnl Mods for X port.
13dnl
14dnl Revision 1.1.1.1 1999/03/16 18:05:49 aram
15dnl Originals from SMIME Free Library.
16dnl
17dnl Revision 1.13 1997/09/04 13:54:04 wan
18dnl A little more portability
19dnl
20dnl Revision 1.12 1997/02/28 13:39:35 wan
21dnl Modifications collected for new version 1.3: Bug fixes, tk4.2.
22dnl
23dnl Revision 1.11 1997/02/16 16:50:27 rj
24dnl made return *this after calling abort()'' a compile time option.
25dnl
26dnl Revision 1.10 1997/02/15 20:06:27 rj
27dnl adjust to changed AC_TRY_COMPILE macro
28dnl
29dnl Revision 1.9 1997/02/15 20:01:38 rj
30dnl check whether the compiler supports volatile functions (and whether abort() is volatile).
31dnl
32dnl Revision 1.8 1997/01/01 19:57:01 rj
33dnl changes for autoconf version 2.12
34dnl
35dnl Revision 1.7 1995/09/07 18:36:47 rj
36dnl psbook and psnup are looked for (used by .../doc/makefile)
37dnl
38dnl Revision 1.6 1995/07/24 14:44:47 rj
39dnl don't use gcc/g++ with -pipe, compiling some files may exceed virtual memory.
40dnl
41dnl look for tclsh(1). tcl-lib uses it to construct the tclIndex file. don't look for Tcl/Tk if the tclsh is absent.
42dnl
43dnl look for patch(1). the c-lib uses it to patch tbl.h.
44dnl
45dnl search for tree-3.6's libtktree.a and set TREELIBS in .../makehead accordingly.
46dnl
47dnl check for memset(3), memcpy(3) and memcmp(3). .../snacc.h reverts to bzero(3), bcopy(3) and bcmp(3) if necessary.
48dnl
49dnl Revision 1.5 1995/02/20 11:18:41 rj
50dnl cpp switch HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS added.
51dnl check for isinf(3) and finite(3) added.
52dnl
53dnl Revision 1.4 1995/02/17 15:15:44 rj
54dnl hack to let makedepend find .h files the way gcc does.
55dnl
56dnl Revision 1.3 1995/02/17 14:26:40 rj
57dnl adjustments for autoconf 2.x
58dnl
59dnl Revision 1.2 1994/10/08 04:29:37 rj
60dnl search for Tcl/Tk
61dnl
62dnl Revision 1.1 1994/09/01 00:51:22 rj
63dnl first check-in (new file).
64dnl
65AC_INIT( compiler/core/snacc.c)
66AC_CONFIG_HEADER( config.h)
67dnl --- alternative programs:
68AC_PROG_MAKE_SET
69AC_PROG_CC
70AC_ISC_POSIX
71if test -n "$GCC"; then
72dnl saveCC="$CC"
73dnl CC="$CC -pipe"
74dnl AC_MSG_CHECKING( whether $saveCC takes -pipe)
75dnl 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)
85fi
86AC_PROG_GCC_TRADITIONAL
87AC_PROG_CC_C_O
88if 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!)
90fi
91AC_MSG_CHECKING( whether ANSI or K&R style C)
92AC_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))
93AC_PROG_CXX
94AC_LANG_CPLUSPLUS
95dnl if test -n "$GCC"; then
96dnl saveCXX="$CXX"
97dnl CXX="$CXX -pipe"
98dnl AC_MSG_CHECKING( whether $saveCXX takes -pipe)
99dnl AC_TRY_LINK( , , [AC_MSG_RESULT( yes)], [AC_MSG_RESULT( no);CC="$saveCC"])
100dnl fi
101AC_MSG_CHECKING( for bool built-in)
102AC_TRY_COMPILE( , bool b = false;, [AC_DEFINE( BOOL_BUILTIN) AC_MSG_RESULT( yes)], AC_MSG_RESULT( no))
103AC_MSG_CHECKING( for variable sized automatic arrays)
104AC_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))
105AC_MSG_CHECKING( for volatile functions)
106AC_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)])
107AC_LANG_C
108AC_PROG_LEX
109AC_DECL_YYTEXT
110case "$LEX" in
111 lex)
112 LFLAGS="-Nc10000"
113 ;;
114 flex)
115 CFLAGS="$CFLAGS -DFLEX_IN_USE"
116esac
117AC_SUBST( LFLAGS)
118AC_SUBST( CFLAGS)
119# the boot strapping code in .../c-lib/ needs patch:
120AC_CHECK_PROGS( PATCH, patch, false)
121AC_PROG_YACC
122AC_CHECK_PROGS( MKDEP, makedepend mkdep mkdep.sh, $CC)
123AC_CHECK_PROGS( AR, ar, ar)
124AC_PROG_RANLIB
125AC_PROG_INSTALL
126dnl --- header files:
127AC_HEADER_TIME
128AC_HEADER_DIRENT
129AC_TYPE_SIZE_T
130AC_TYPE_UID_T
131AC_HEADER_STDC
132AC_CHECK_HEADERS( unistd.h memory.h string.h malloc.h fcntl.h)
133AC_FUNC_VPRINTF
134dnl --- system and compiler characteristics:
135AC_C_CONST
136AC_C_BIGENDIAN
137AC_CHECK_SIZEOF( short)
138AC_CHECK_SIZEOF( int)
139AC_CHECK_SIZEOF( long)
140AC_CHECK_SIZEOF( double)
141AC_CHECK_LIB( m, sin)
142AC_CHECK_FUNCS( isinf finite)
143AC_CHECK_FUNCS( memset memcpy memcmp)
144dnl ---
145AC_PATH_X
146AC_PATH_XTRA
147AC_CHECK_PROGS( TCLSH, tclsh, false)
148if 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)])
175fi
176AC_SUBST( TCLLIBS)
177AC_SUBST( TREELIBS)
178dnl ---
179AC_CHECK_PROGS( LATEX, latex, false)
180AC_CHECK_PROGS( BIBTEX, bibtex, false)
181AC_CHECK_PROGS( DVIPS, dvips, false)
182AC_CHECK_PROGS( DETEX, detex2 detex, false)
183AC_CHECK_PROGS( PSPREVIEW, ghostview gs, true)
184AC_CHECK_PROGS( PSBOOK, psbook, false)
185AC_CHECK_PROGS( PSNUP, psnup, false)
186AC_CHECK_PROGS( SPELL, ispell spell, spell)
187dnl ---
188AC_OUTPUT( makehead, date > stamp-h)
189dnl --- finis