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 ;-)
7 dnl without this order in this file, automake will be confused!
9 AM_CONFIG_HEADER(config.h)
11 dnl ask for Qt and KDE version
12 AC_ARG_WITH(kde-version,
13 [ --with-kde-version=N KDE version to configure for: 1 (default) or 2],
14 :, with_kde_version=1)
15 if test "x$with_kde_version" = "x1"; then
16 AC_MSG_RESULT("configuring for KDE 1.1.x and Qt 1.4x")
17 elif test "x$with_kde_version" = "x2"; then
18 AC_MSG_RESULT("configuring for KDE 2 and Qt 2.0")
20 AC_ERROR([The argument to --with-kde-version must be
26 dnl insert here your program name and version number
27 KDE_USE_QT($with_kde_version)
28 KDE_DO_IT_ALL(kdbg, 1.1.4)
30 dnl in this space add everything you want to check for
31 dnl examples are specific headers, libraries, etc.
32 dnl everything to compile and run a KDE program is already checked
34 dnl Checks for header files.
35 AC_LANG_C dnl switch to C
36 AC_HEADER_DIRENT dnl check for dirent.h
37 AC_HEADER_STDC dnl check for other stdc headers. More traditional ;)
38 dnl check for some more header files. You can remove some of
39 dnl them, if you want to. But it doesn't hurt
40 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/cdefs.h)
41 AC_CHECK_HEADERS(fnmatch.h sysent.h strings.h sys/stat.h)
42 AC_CHECK_HEADERS(sys/ioctl.h pty.h)
44 dnl Checks for libraries.
45 AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris' X11
48 dnl Checks for typedefs, structures, and compiler characteristics.
51 dnl Checks for library functions.
52 AC_CHECK_FUNCS(setpgid putenv socket vsnprintf mkfifo)
55 dnl pseudo tty support in glibc2
56 AC_SEARCH_LIBS(openpty, util,
57 AC_DEFINE_UNQUOTED(HAVE_FUNC_OPENPTY, 1, [Define if you have openpty]))
59 dnl Check whether we want much debugging output
60 AC_MSG_CHECKING([whether kdbg should generate lots of trace output])
61 dnl Default is no trace output
62 AC_ARG_ENABLE(lots-a-trace,
63 [ --enable-lots-a-trace generate lots of trace output [default=no]],
64 WANT_TRACE_OUTPUT=$enableval, WANT_TRACE_OUTPUT=no)
65 AC_MSG_RESULT($WANT_TRACE_OUTPUT)
66 if test "x$WANT_TRACE_OUTPUT" = "xyes"; then
67 AC_DEFINE_UNQUOTED(WANT_TRACE_OUTPUT)
70 dnl Check whether test programs should be compiled
71 dnl Default is not to compile them
72 AC_ARG_ENABLE(testprogs,
73 [ --enable-testprogs compile test programs [default=no]],
74 [buildtestprogs=$enableval],[buildtestprogs=no])
75 AM_CONDITIONAL(BUILDTESTPROGS,test "x$buildtestprogs" = "xyes")
76 dnl write a notice into the log
77 echo "build test programs: $buildtestprogs" >&5
79 dnl Check where the communication with gdb should be logged
80 AC_MSG_CHECKING([where communication with gdb should be logged])
81 dnl Default is ./gdb-transcript until kdbg is released
82 AC_ARG_WITH(transcript,
83 [ --with-transcript=file log communication with gdb [default=not logged]],
84 GDB_TRANSCRIPT=$withval, GDB_TRANSCRIPT=no)
85 if test "x$GDB_TRANSCRIPT" = "xyes"; then
86 GDB_TRANSCRIPT="./gdb-transcript"
88 if test "x$GDB_TRANSCRIPT" = "xno"; then
89 GDB_TRANSCRIPT="not logged"
92 GDB_TRANSCRIPT=\"$GDB_TRANSCRIPT\"
93 AC_DEFINE_UNQUOTED(GDB_TRANSCRIPT, $GDB_TRANSCRIPT)
95 AC_MSG_RESULT($GDB_TRANSCRIPT)
97 dnl Check whether placement new works
99 AC_MSG_CHECKING(whether placement new is available)
100 AC_CACHE_VAL(ac_cv_have_placement_new,
109 ac_cv_have_placement_new=yes,
110 ac_cv_have_placement_new=no)
112 AC_MSG_RESULT($ac_cv_have_placement_new)
113 if eval "test \"`echo `$ac_cv_have_placement_new\" = yes"; then
114 AC_DEFINE(HAVE_PLACEMENT_NEW)
117 dnl add here all your Makefiles. These are created by configure
120 DockWidget/Makefile \
123 kdbg/doc/de/Makefile \
124 kdbg/doc/en/Makefile \
125 kdbg/doc/ru/Makefile \
127 kdbg/typetables/Makefile \
128 kdbg/testprogs/Makefile \