Removed bogus AC_FOREACH implementation.
[kdbg.git] / configure.in.mid
blob2cfdeb9b14236a1012ed00fba5fec25b2c5c8f87
1 dnl Checks for header files.
2 AC_LANG_C dnl switch to C
3 AC_HEADER_DIRENT dnl check for dirent.h
4 AC_HEADER_STDC dnl check for other stdc headers. More traditional ;)
5 dnl check for some more header files. You can remove some of
6 dnl them, if you want to. But it doesn't hurt
7 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/cdefs.h)
8 AC_CHECK_HEADERS(fnmatch.h sysent.h strings.h sys/stat.h)
9 AC_CHECK_HEADERS(sys/ioctl.h pty.h libutil.h util.h)
11 dnl Checks for libraries.
12 AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris' X11
13 AC_SUBST(LIBSOCKET)
15 dnl Checks for typedefs, structures, and compiler characteristics.
16 AC_HEADER_TIME
18 dnl Checks for library functions.
19 AC_CHECK_FUNCS(setpgid putenv socket vsnprintf mkfifo)
21 dnl pseudo tty support in glibc2
22 AC_SEARCH_LIBS(openpty, util,
23   AC_DEFINE_UNQUOTED(HAVE_FUNC_OPENPTY, 1, [Define if you have openpty]))
25 dnl Check whether we want much debugging output
26 AC_MSG_CHECKING([whether kdbg should generate lots of trace output])
27 dnl Default is no trace output
28 AC_ARG_ENABLE(lots-a-trace,
29   [  --enable-lots-a-trace   generate lots of trace output [default=no]],
30   WANT_TRACE_OUTPUT=$enableval, WANT_TRACE_OUTPUT=no)
31 AC_MSG_RESULT($WANT_TRACE_OUTPUT)
32 if test "x$WANT_TRACE_OUTPUT" = "xyes"; then
33   AC_DEFINE_UNQUOTED(WANT_TRACE_OUTPUT)
36 dnl Check whether test programs should be compiled
37 dnl Default is not to compile them
38 AC_ARG_ENABLE(testprogs,
39   [  --enable-testprogs      compile test programs [default=no]],
40   [buildtestprogs=$enableval],[buildtestprogs=no])
41 AM_CONDITIONAL(BUILDTESTPROGS,test "x$buildtestprogs" = "xyes")
42 dnl write a notice into the log
43 echo "build test programs: $buildtestprogs" >&5
45 dnl Check where the communication with gdb should be logged
46 AC_MSG_CHECKING([where communication with gdb should be logged])
47 dnl Default is ./gdb-transcript until kdbg is released
48 AC_ARG_WITH(transcript,
49   [  --with-transcript=file  log communication with gdb [default=not logged]],
50   GDB_TRANSCRIPT=$withval, GDB_TRANSCRIPT=no)
51 if test "x$GDB_TRANSCRIPT" = "xyes"; then
52   GDB_TRANSCRIPT="./gdb-transcript"
54 if test "x$GDB_TRANSCRIPT" = "xno"; then
55   GDB_TRANSCRIPT="not logged"
56 else
57   dnl add quotes
58   GDB_TRANSCRIPT=\"$GDB_TRANSCRIPT\"
59   AC_DEFINE_UNQUOTED(GDB_TRANSCRIPT, $GDB_TRANSCRIPT)
61 AC_MSG_RESULT($GDB_TRANSCRIPT)
63 dnl Check whether placement new works
64 AC_LANG_CPLUSPLUS
65 AC_MSG_CHECKING(whether placement new is available)
66 AC_CACHE_VAL(ac_cv_have_placement_new,
68 AC_TRY_COMPILE([
69 #include <new>
72 int ii;
73 new(&ii) int;
75 ac_cv_have_placement_new=yes,
76 ac_cv_have_placement_new=no)
78 AC_MSG_RESULT($ac_cv_have_placement_new)
79 if eval "test \"`echo `$ac_cv_have_placement_new\" = yes"; then
80   AC_DEFINE(HAVE_PLACEMENT_NEW)
83 AC_MSG_CHECKING(for KDE 3)
85 AC_LANG_CPLUSPLUS
86 ac_cxxflags_safe="$CXXFLAGS"
87 CXXFLAGS="$CXXFLAGS -I$qt_includes $all_includes"
89 AC_TRY_COMPILE([
90 #include <kapp.h>
91 ], [
92 #if KDE_VERSION < 292
93 give me an error, this is KDE 2
94 #endif
95 ], [this_is_kde3=yes],[this_is_kde3=no])
97 AM_CONDITIONAL(BUILD_FOR_KDE3, test x$this_is_kde3 = xyes)
99 CXXFLAGS="$ac_cxxflags_safe"
101 AC_MSG_RESULT($this_is_kde3)