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)
11 dnl Checks for libraries.
12 AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris' X11
15 dnl Checks for typedefs, structures, and compiler characteristics.
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"
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
65 AC_MSG_CHECKING(whether placement new is available)
66 AC_CACHE_VAL(ac_cv_have_placement_new,
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)