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.x")
20 AC_ERROR([The argument to --with-kde-version must be
25 AM_CONDITIONAL(BUILDFORKDE2, test "x$with_kde_version" = "x2")
27 dnl insert here your program name and version number
28 KDE_USE_QT($with_kde_version)
29 KDE_DO_IT_ALL(kdbg, 1.2.2)
31 dnl in this space add everything you want to check for
32 dnl examples are specific headers, libraries, etc.
33 dnl everything to compile and run a KDE program is already checked
35 dnl Checks for header files.
36 AC_LANG_C dnl switch to C
37 AC_HEADER_DIRENT dnl check for dirent.h
38 AC_HEADER_STDC dnl check for other stdc headers. More traditional ;)
39 dnl check for some more header files. You can remove some of
40 dnl them, if you want to. But it doesn't hurt
41 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/cdefs.h)
42 AC_CHECK_HEADERS(fnmatch.h sysent.h strings.h sys/stat.h)
43 AC_CHECK_HEADERS(sys/ioctl.h pty.h libutil.h)
45 dnl Checks for libraries.
46 AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris' X11
49 dnl Checks for typedefs, structures, and compiler characteristics.
52 dnl Checks for library functions.
53 AC_CHECK_FUNCS(setpgid putenv socket vsnprintf mkfifo)
56 dnl pseudo tty support in glibc2
57 AC_SEARCH_LIBS(openpty, util,
58 AC_DEFINE_UNQUOTED(HAVE_FUNC_OPENPTY, 1, [Define if you have openpty]))
60 dnl Check whether we want much debugging output
61 AC_MSG_CHECKING([whether kdbg should generate lots of trace output])
62 dnl Default is no trace output
63 AC_ARG_ENABLE(lots-a-trace,
64 [ --enable-lots-a-trace generate lots of trace output [default=no]],
65 WANT_TRACE_OUTPUT=$enableval, WANT_TRACE_OUTPUT=no)
66 AC_MSG_RESULT($WANT_TRACE_OUTPUT)
67 if test "x$WANT_TRACE_OUTPUT" = "xyes"; then
68 AC_DEFINE_UNQUOTED(WANT_TRACE_OUTPUT)
71 dnl Check whether test programs should be compiled
72 dnl Default is not to compile them
73 AC_ARG_ENABLE(testprogs,
74 [ --enable-testprogs compile test programs [default=no]],
75 [buildtestprogs=$enableval],[buildtestprogs=no])
76 AM_CONDITIONAL(BUILDTESTPROGS,test "x$buildtestprogs" = "xyes")
77 dnl write a notice into the log
78 echo "build test programs: $buildtestprogs" >&5
80 dnl Check where the communication with gdb should be logged
81 AC_MSG_CHECKING([where communication with gdb should be logged])
82 dnl Default is ./gdb-transcript until kdbg is released
83 AC_ARG_WITH(transcript,
84 [ --with-transcript=file log communication with gdb [default=not logged]],
85 GDB_TRANSCRIPT=$withval, GDB_TRANSCRIPT=no)
86 if test "x$GDB_TRANSCRIPT" = "xyes"; then
87 GDB_TRANSCRIPT="./gdb-transcript"
89 if test "x$GDB_TRANSCRIPT" = "xno"; then
90 GDB_TRANSCRIPT="not logged"
93 GDB_TRANSCRIPT=\"$GDB_TRANSCRIPT\"
94 AC_DEFINE_UNQUOTED(GDB_TRANSCRIPT, $GDB_TRANSCRIPT)
96 AC_MSG_RESULT($GDB_TRANSCRIPT)
98 dnl Check whether placement new works
100 AC_MSG_CHECKING(whether placement new is available)
101 AC_CACHE_VAL(ac_cv_have_placement_new,
110 ac_cv_have_placement_new=yes,
111 ac_cv_have_placement_new=no)
113 AC_MSG_RESULT($ac_cv_have_placement_new)
114 if eval "test \"`echo `$ac_cv_have_placement_new\" = yes"; then
115 AC_DEFINE(HAVE_PLACEMENT_NEW)
118 dnl add here all your Makefiles. These are created by configure
121 DockWidget/Makefile \
124 kdbg/doc/de/Makefile \
125 kdbg/doc/en/Makefile \
126 kdbg/doc/ru/Makefile \
128 kdbg/typetables/Makefile \
129 kdbg/testprogs/Makefile \