Fixed segfault due to type table that hasn't been allocated.
[kdbg.git] / configure.in
blob1ec59210b08220b1d3753fecd7601e0db1666241
2 dnl without this order in this file, autoconf will not work!
3 dnl the argument is a source file out of your sources. But
4 dnl acinclude.m4 makes the job for all programs ;-)
5 AC_INIT(acinclude.m4)
7 dnl without this order in this file, automake will be confused!
8 dnl the argument 
9 AM_CONFIG_HEADER(config.h)
11 dnl insert here your program name and version number
12 KDE_USE_QT(1,>= 1.42, QT_VERSION >= 142)
13 KDE_DO_IT_ALL(kdbg, 0.3.1)
15 dnl in this space add everything you want to check for
16 dnl examples are specific headers, libraries, etc.
17 dnl everything to compile and run a KDE program is already checked
19 dnl Checks for header files.
20 AC_LANG_CPLUSPLUS dnl switch to C++
21 AC_HEADER_DIRENT dnl check for dirent.h
22 AC_HEADER_STDC dnl check for other stdc headers. More traditional ;)
23 dnl check for some more header files. You can remove some of
24 dnl them, if you want to. But it doesn't hurt
25 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/cdefs.h)
26 AC_CHECK_HEADERS(fnmatch.h sysent.h strings.h sys/stat.h)
28 dnl Checks for libraries.
29 AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris' X11
30 AC_SUBST(LIBSOCKET)
32 dnl Checks for typedefs, structures, and compiler characteristics.
33 AC_HEADER_TIME
35 dnl Checks for library functions.
36 AC_CHECK_FUNCS(setpgid putenv socket vsnprintf mkfifo)
37 AC_CHECK_SETENV
38 AC_LANG_CPLUSPLUS
40 dnl Check whether we want much debugging output
41 AC_MSG_CHECKING([whether kdbg should generate lots of trace output])
42 dnl Default is no trace output
43 AC_ARG_ENABLE(lots-a-trace,
44   [  --enable-lots-a-trace   generate lots of trace output [default=no]],
45   WANT_TRACE_OUTPUT=$enableval, WANT_TRACE_OUTPUT=no)
46 AC_MSG_RESULT($WANT_TRACE_OUTPUT)
47 if test "x$WANT_TRACE_OUTPUT" = "xyes"; then
48   AC_DEFINE_UNQUOTED(WANT_TRACE_OUTPUT)
51 dnl Check where the communication with gdb should be logged
52 AC_MSG_CHECKING([where communication with gdb should be logged])
53 dnl Default is ./gdb-transcript until kdbg is released
54 AC_ARG_WITH(transcript,
55   [  --with-transcript=file  log communication with gdb [default=./gdb-transcript]],
56   GDB_TRANSCRIPT=$withval, GDB_TRANSCRIPT=yes)
57 if test "x$GDB_TRANSCRIPT" = "xyes"; then
58   GDB_TRANSCRIPT="./gdb-transcript"
60 if test "x$GDB_TRANSCRIPT" = "xno"; then
61   GDB_TRANSCRIPT="not logged"
62 else
63   dnl add quotes
64   GDB_TRANSCRIPT=\"$GDB_TRANSCRIPT\"
65   AC_DEFINE_UNQUOTED(GDB_TRANSCRIPT, $GDB_TRANSCRIPT)
67 AC_MSG_RESULT($GDB_TRANSCRIPT)
69 dnl Check whether placement new works
70 AC_LANG_CPLUSPLUS
71 AC_MSG_CHECKING(whether placement new is available)
72 AC_CACHE_VAL(ac_cv_have_placement_new,
74 AC_TRY_COMPILE([
75 #include <new>
78 int ii;
79 new(&ii) int;
81 ac_cv_have_placement_new=yes,
82 ac_cv_have_placement_new=no)
84 AC_MSG_RESULT($ac_cv_have_placement_new)
85 if eval "test \"`echo `$ac_cv_have_placement_new\" = yes"; then
86   AC_DEFINE(HAVE_PLACEMENT_NEW)
89 dnl add here all your Makefiles. These are created by configure
90 AC_OUTPUT(Makefile \
91         kdbg/Makefile \
92         kdbg/doc/Makefile \
93         kdbg/doc/en/Makefile \
94         po/Makefile)