source: trunk/gsdl/configure.in@ 552

Last change on this file since 552 was 552, checked in by cs025, 25 years ago

added configure stuff

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(lib/text_t.h)
3
4PACKAGE=grb
5VERSION=0.1
6AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
7AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
8AC_SUBST(PACKAGE)
9AC_SUBST(VERSION)
10
11dnl Checks for programs.
12AC_PROG_CC
13AC_PROG_CXX
14dnl AC_PROG_INSTALL
15AC_PROG_LN_S
16AC_PROG_MAKE_SET
17AC_PROG_RANLIB
18
19dnl Checks for libraries.
20dnl Replace `main' with a function in -lg:
21AC_CHECK_LIB(g, main)
22dnl Replace `main' with a function in -lgdbm:
23AC_CHECK_LIB(gdbm, main)
24dnl Replace `main' with a function in -lm:
25AC_CHECK_LIB(m, main)
26dnl Replace `main' with a function in -lstdc:
27AC_CHECK_LIB(stdc, main)
28
29dnl Checks for header files.
30AC_HEADER_STDC
31AC_CHECK_HEADERS(fcntl.h)
32
33dnl Checks for typedefs, structures, and compiler characteristics.
34AC_C_CONST
35AC_HEADER_TIME
36
37
38dnl
39dnl Check if the STL library has any known faults;
40dnl In GCC 2.7.2.x series, some STL library headers are missing
41dnl a file called "new" which is referred to by other headers
42dnl (eg. vector/vector.h); if this applies, then all use of the
43dnl STL will cause a compile fail, so we'd better let the user
44dnl know now, before things really go wrong!
45dnl
46AC_LANG_CPLUSPLUS
47success=no
48AC_MSG_CHECKING("whether STL library has known faults")
49
50dnl - first shot, try simple good old vector on its own
51AC_TRY_COMPILE(
52[#include <vector>
53],
54[],
55success=yes,
56)
57
58dnl - try using the .h equivalent
59if test $success = "no"; then
60AC_TRY_COMPILE(
61[#include <vector.h>
62],
63[],
64success="yes",
65)
66fi
67
68dnl - now try for the objectspace headers
69if test $success = "no"; then
70AC_TRY_COMPILE(
71[#include <ospace\\std\\vector>
72],
73[],
74success="yes",
75)
76fi
77
78if test $success = yes; then
79AC_MSG_RESULT("no")
80else
81AC_MSG_RESULT("yes")
82AC_MSG_ERROR("STL Broken - new not found in vector header file")
83fi
84
85dnl Checks for library functions.
86AC_FUNC_VPRINTF
87
88AC_OUTPUT(src/hashfile/Makefile src/recpt/Makefile src/txt2db/Makefile src/db2txt/Makefile lib/Makefile Makefile)
89
90
91
92
Note: See TracBrowser for help on using the repository browser.