Fix problem with running wvlog.t.cc on win32.
[wvstreams.git] / configure.ac
blobf286fc8b20c76e87d884fc574cc23bcb57a8db57
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(WvStreams, 4.4.1, wvstreams-devel@googlegroups.com, wvstreams)
3 SO_VERSION=4.4
5 save_args() {
6     ARGS=""
8     while test $# -gt 0; do
9         ARGS="$ARGS \"$1\""
10         shift
11     done
13     rm -f reconfigure
14     echo $0 $ARGS '"$@"' >reconfigure
15     chmod +x reconfigure
18 save_args "$@"
20 # append to a variable without introducing superfluous white space
21 AC_DEFUN([WV_APPEND],[
22     if test -z "$$1"; then
23         $1="$2"
24     else
25         $1="$$1 $2"
26     fi
29 QT_SEARCH_PATH="
30 $prefix
31 /usr
32 $libdir/qt-3.1
33 $libdir/qt3
34 $libdir/qt
35 $datadir/qt3
36 $datadir/qt
37 /usr
38 /usr/lib/qt3
39 /usr/lib/qt-3.1
40 /usr/share/qt3
41 /usr/lib/qt
42 /usr/share/qt
45 AC_CONFIG_SRCDIR(streams/wvstream.cc)
47 AC_ARG_ENABLE(debug,
48               AC_HELP_STRING([--disable-debug],
49                              [strip debug information]))
51 AC_ARG_ENABLE(devel,
52               AC_HELP_STRING([--enable-devel],
53                              [developer options]))
55 AC_ARG_ENABLE(efence,
56               AC_HELP_STRING([--enable-efence],
57                              [link against Electric Fence]))
59 AC_ARG_ENABLE(fatal-warnings,
60               AC_HELP_STRING([--enable-fatal-warnings],
61                              [turn warnings into errors]))
63 AC_ARG_ENABLE(optimization,
64               AC_HELP_STRING([--disable-optimization],
65                              [optimization options]))
67 AC_ARG_ENABLE(resolver-fork,
68               AC_HELP_STRING([--disable-resolver-fork],
69                              [WvResolver background name resolution (debugging)]))
71 AC_ARG_ENABLE(delete-detector,
72               AC_HELP_STRING([--enable-delete-detector],
73                              [Delete detector (reference counting)]))
75 AC_ARG_ENABLE(verbose,
76               AC_HELP_STRING([--enable-verbose],
77                              [verbose compilation output]))
79 AC_ARG_ENABLE(warnings,
80               AC_HELP_STRING([--disable-warnings],
81                              [extra warnings]))
83 AC_ARG_ENABLE(testgui,
84               AC_HELP_STRING([--disable-testgui],
85                              [GUI for unit tests]))
87 AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus], [DBUS]))
88 AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl], [OpenSSL >= 0.9.7 (required)]))
89 AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam], [PAM]))
90 AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl], [Tcl]))
91 AC_ARG_WITH(qt, AC_HELP_STRING([--with-qt], [Qt]))
92 xplc_version='0.3.13'
93 AC_ARG_WITH(xplc, AC_HELP_STRING([--with-xplc], [XPLC ${xplc_version} (required)]))
94 AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [zlib (required)]))
96 AC_ARG_VAR(MOC, [Qt meta object compiler])
97 AC_ARG_VAR(WEAVER_BUILD_INFO, [Extra version info])
99 # avoid autoconf's default values, but keep those the user might have given
100 CFLAGS="-fPIC $CFLAGS"
101 CXXFLAGS="-fPIC $CXXFLAGS"
103 AC_PROG_CC
104 AC_PROG_CXX
105 AC_PROG_CPP
106 AC_PROG_CXXCPP
107 AC_PROG_INSTALL
108 AC_PROG_LN_S
109 AC_PROG_MAKE_SET
110 AC_PROG_RANLIB
112 # Poke gnulib
113 gl_EARLY
115 # Detect target build environment
116 AC_CANONICAL_TARGET
117 case "$target" in
118     *-linux*)
119         ARCH_SUBDIRS="linuxstreams"
120         ;;
121     *-sunos*|*-solaris*)
122         ARCH_SUBDIRS=""
123         ac_libs="-lstdc++ -lgcc_s -ldl -lm -lc"
124         ;;
125     *)
126         ARCH_SUBDIRS=""
127         ;;
128 esac
129 AC_SUBST(target)
130 AC_SUBST(ARCH_SUBDIRS)
132 # Detect endianness
133 AC_C_BIGENDIAN
135 # Look for __attribute__ ((deprecated))
136 CPPFLAGS_save="$CPPFLAGS"
137 WV_APPEND(CPPFLAGS, -Werror)
138 AC_MSG_CHECKING(for __attribute__ ((deprecated)))
139 AC_COMPILE_IFELSE(
140 [#include "confdefs.h"
141 void f() __attribute__ ((deprecated));
142 void f()
146 int main()
148     return 0;
151                   [AC_MSG_RESULT([yes])
152                    AC_DEFINE([ATTR_DEPRECATED],
153                              [__attribute__ ((deprecated))],
154                              [Compiler warning on deprecated functions])],
155                   [AC_MSG_RESULT([no])
156                    AC_DEFINE([ATTR_DEPRECATED], [],
157                              [Compiler warning on deprecated functions])])
158 CPPFLAGS="$CPPFLAGS_save"
160 # Function checks
161 AC_FUNC_ALLOCA
163 AC_CHECK_HEADERS(execinfo.h)
165 # Initialise gnulib
166 gl_INIT
168 # Check for error_t
169 AC_CHECK_HEADERS([argz.h errno.h])
170 AC_CHECK_TYPE(error_t,, [AC_DEFINE([error_t], [int],
171                                   [Define to a type to use for `error_t' if it is not otherwise available.])
172 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
173     does not typedef error_t.])],dnl `
174 [#if HAVE_ARGZ_H
175 # include <argz.h>
176 #else
177 # if HAVE_ERRNO_H
178 #  include <errno.h>
179 # endif
180 #endif])
182 # Check for size of ethernet addresses
183 AC_CHECK_HEADERS([sys/socket.h])
184 AC_CHECK_HEADERS([net/if.h], [], [],
185 [#include <stdio.h>
186 #if STDC_HEADERS
187 # include <stdlib.h>
188 # include <stddef.h>
189 #else
190 # if HAVE_STDLIB_H
191 #  include <stdlib.h>
192 # endif
193 #endif
194 #if HAVE_SYS_SOCKET_H
195 # include <sys/socket.h>
196 #endif
198 AC_CHECK_HEADERS([net/ethernet.h], [], [],
199 [#include <stdio.h>
200 #if STDC_HEADERS
201 # include <stdlib.h>
202 # include <stddef.h>
203 #else
204 # if HAVE_STDLIB_H
205 #  include <stdlib.h>
206 # endif
207 #endif
208 #if HAVE_SYS_SOCKET_H
209 # include <sys/socket.h>
210 #endif
212 AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
213 [#include <stdio.h>
214 #if STDC_HEADERS
215 # include <stdlib.h>
216 # include <stddef.h>
217 #else
218 # if HAVE_STDLIB_H
219 #  include <stdlib.h>
220 # endif
221 #endif
222 #if HAVE_SYS_SOCKET_H
223 # include <sys/socket.h>
224 #endif
225 #if HAVE_NET_IF_H
226 # include <net/if.h>
227 #endif
229 AC_CHECK_DECL(ETHER_ADDR_LEN,,
230               AC_CHECK_TYPE(ether_addr_t,
231                             AC_DEFINE([ETHER_ADDR_LEN], [sizeof(ether_addr_t)],
232                                       [Size of ethernet address]),
233                             AC_DEFINE([ETHER_ADDR_LEN], [6]),
234 [#include <stdio.h>
235 #if HAVE_SYS_TYPES_H
236 # include <sys/types.h>
237 #endif
238 #if STDC_HEADERS
239 # include <stdlib.h>
240 # include <stddef.h>
241 #else
242 # if HAVE_STDLIB_H
243 #  include <stdlib.h>
244 # endif
245 #endif
246 #if HAVE_SYS_SOCKET_H
247 # include <sys/socket.h>
248 #endif
249 #if HAVE_NET_ETHERNET_H
250 # include <net/ethernet.h>
251 #endif
252 #if HAVE_NET_IF_H
253 # include <net/if.h>
254 #endif
255 #if HAVE_NETINET_IF_ETHER_H
256 # include <netinet/if_ether.h>
257 #endif
259 [#include <stdio.h>
260 #if HAVE_SYS_TYPES_H
261 # include <sys/types.h>
262 #endif
263 #if STDC_HEADERS
264 # include <stdlib.h>
265 # include <stddef.h>
266 #else
267 # if HAVE_STDLIB_H
268 #  include <stdlib.h>
269 # endif
270 #endif
271 #if HAVE_SYS_SOCKET_H
272 # include <sys/socket.h>
273 #endif
274 #if HAVE_NET_ETHERNET_H
275 # include <net/ethernet.h>
276 #endif
277 #if HAVE_NET_IF_H
278 # include <net/if.h>
279 #endif
280 #if HAVE_NETINET_IF_ETHER_H
281 # include <netinet/if_ether.h>
282 #endif
285 # Check for basic Internet support
286 AC_CHECK_HEADERS([netdb.h])
287 AC_CHECK_HEADERS([netinet/in.h])
288 AC_CHECK_HEADERS([netinet/in_systm.h])
289 AC_CHECK_HEADERS([netinet/ip.h], [], [],
290 [#include <stdio.h>
291 #if HAVE_SYS_TYPES_H
292 # include <sys/types.h>
293 #endif
294 #if STDC_HEADERS
295 # include <stdlib.h>
296 # include <stddef.h>
297 #else
298 # if HAVE_STDLIB_H
299 #  include <stdlib.h>
300 # endif
301 #endif
302 #if HAVE_NETINET_IN_H
303 # include <netinet/in.h>
304 #endif
305 #if HAVE_NETINET_IN_SYSTM_H
306 # include <netinet/in_systm.h>
307 #endif
309 AC_CHECK_HEADERS([netinet/tcp.h])
311 # Check for advanced Linux-style modem support
312 AC_CHECK_HEADERS([linux/serial.h])
313 AC_CHECK_FUNCS([cfmakeraw])
315 # Detect hard-linking based on LN_S's behaviour
316 AC_MSG_CHECKING([whether ln works...])
317 case "$LN_S" in
318     ln*) 
319         LN='ln'
320         AC_MSG_RESULT([yes])
321         ;;
322     *)
323         LN="$LN_S"
324         AC_MSG_RESULT([no, using $LN])
325         ;;
326 esac
327 AC_SUBST(LN)
329 # Setting the default language to C++ means that CXX and CXXCPP will be 
330 # used for compile tests.
331 AC_LANG(C++)
333 # Detect pkg-config
334 AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
335 if test "$PKGCONFIG" = "no"; then
336     if test "$with_xplc" = ""; then
337         AC_MSG_ERROR([pkg-config is not installed])
338     else
339         AC_MSG_WARN([pkg-config is not installed])
340     fi
343 # devel
344 if test "$enable_devel" = "yes"; then
345     enable_debug=yes
346     enable_fatal_warnings=yes
347     enable_warnings=yes
350 if test "$enable_debug" != "no"; then
351     AC_DEFINE_UNQUOTED(VER_STRING_EXTRA, [" (`whoami`@`hostname`$VER_STRING_EXTRA)"], [Extra version string.])
354 # resolver-fork
355 if test "$enable_resolver_fork" = "no"; then
356     AC_DEFINE(WVRESOLVER_SKIP_FORK,,
357               [Define to disable WvResolver forking for debugging with gdb.])
360 # resolver-fork
361 if test "$enable_delete_detector" = "yes"; then
362     AC_DEFINE(ENABLE_DELETE_DETECTOR,,
363               [Define to enable the XPLC delete detector.])
366 # dbus
367 if test "$with_dbus" != "no"; then
368     WV_APPEND(CPPFLAGS, -DDBUS_API_SUBJECT_TO_CHANGE -Iinclude/dbus-upstream)
369     if test "$with_dbus" = ""; then
370         DBUS_LIBDIR="$(pkg-config --libs-only-L dbus-1 | sed 's/^-L//' | awk '{print $1}')"
371         if test -z "$DBUS_LIBDIR"; then
372             DBUS_LIBDIR=/usr/lib  # Default path for static linking
373         fi
374         WV_APPEND(CPPFLAGS, [`pkg-config --cflags dbus-1`])
375         WV_APPEND(LDFLAGS, [`pkg-config --libs-only-L dbus-1`])
376     else
377         DBUS_LIBDIR=$with_dbus/dbus/.libs
378         WV_APPEND(CPPFLAGS, -I$with_dbus)
379         WV_APPEND(LDFLAGS, -L$DBUS_LIBDIR)
380     fi
382     AC_CHECK_HEADERS(dbus/dbus.h,, [with_dbus=no])
383     LIBS_save="$LIBS"
384     LIBS="$LIBS $DBUS_LIBDIR/libdbus-1.a"
385     with_dbus=no
386     AC_TRY_LINK([extern "C" void dbus_message_new(); ],
387                 [dbus_message_new(); ],
388                 [with_dbus=])
389     LIBS="$LIBS_save"
391     if test "$with_dbus" != "no"; then
392         AC_DEFINE(WITH_DBUS,,
393                   [Define to enable DBUS support.])
394         LIBS_DBUS=$DBUS_LIBDIR/libdbus-1.a
395     fi
398 # gtk
399 #if test "$with_gtk" != "no"; then
400 #    CPPFLAGS_save="$CPPFLAGS"
401 #    WV_APPEND(CPPFLAGS,`pkg-config --cflags gtk+ 2>/dev/null`)
402 #    AC_CHECK_HEADERS(gtk/gtk.h,, [with_gtk=no])
403 #    AC_CHECK_LIB(gdk, gdk_init,, [with_gtk=no])
404 #    AC_CHECK_LIB(gtk, gtk_main,, [with_gtk=no])
405 #    test "$with_gtk" = no && CPPFLAGS="$CPPFLAGS_save"
408 # BSD sockets, if you're on Solaris
409 AC_CHECK_LIB(socket, bind)
411 # openssl
412 if test "$with_openssl" != "no"; then
413     if test "$with_openssl" != ""; then
414         WV_APPEND(CPPFLAGS, [-I$with_openssl/include])
415         WV_APPEND(LDFLAGS, [-L$with_openssl])
416     fi
417     AC_CHECK_HEADERS(openssl/ssl.h,, [with_openssl=no],
418                      [#define OPENSSL_NO_KRB5])
419     LIBS_save="$LIBS"
420     AC_CHECK_LIB(crypto, X509_free)
421     AC_CHECK_LIB(ssl, SSL_has_matching_session_id,, [with_openssl=no])
422     LIBS="$LIBS_save"
423     if test "$with_openssl" != "no"; then
424         LIBS_SSL="-lcrypto -lssl"
425     fi
428 # readline
429 if test "$with_readline" != "no"; then
430     AC_CHECK_HEADERS(readline/readline.h,, [with_readline=no])
431     AC_CHECK_LIB(readline, readline,, [with_readline=no])
434 # pam
435 if test "$with_pam" != "no"; then
436     AC_CHECK_HEADERS(security/pam_appl.h,, [with_pam=no])
437     LIBS_save="$LIBS"
438     AC_CHECK_LIB(pam, pam_start,, [with_pam=no])
439     AC_MSG_CHECKING(for sane PAM implementation)
440     AC_COMPILE_IFELSE(
441 [#include "confdefs.h"
442 #if HAVE_SECURITY_PAM_APPL_H
443 # include <security/pam_appl.h>
444 #endif
446 /* noconv: null PAM conversation function */
447 int noconv(int num_msg, const struct pam_message **msgm,
448         struct pam_response **response, void *userdata)
450     // if you need to ask things, it won't work
451     return PAM_CONV_ERR;
454 int main()
456     struct pam_conv c;
457     c.conv = noconv;
458     return 0;
461                       [AC_MSG_RESULT([yes])
462                        AC_DEFINE([HAVE_BROKEN_PAM], [0])],
463                       [AC_MSG_RESULT([no])
464                        AC_DEFINE([HAVE_BROKEN_PAM], [1],
465                                  [Solaris has a broken PAM implementation])])
466     LIBS="$LIBS_save"
467     if test "$with_pam" != "no" -a "$HAVE_BROKEN_PAM" != "1"; then
468         LIBS_PAM=-lpam
469     fi
472 # tcl
473 if test "$with_tcl" != "no"; then
474     CPPFLAGS_save="$CPPFLAGS"
475     WV_APPEND(CPPFLAGS, -I/usr/include/tcl8.3)
476     AC_CHECK_HEADERS(tcl.h,, [with_tcl=no])
477     LIBS_save="$LIBS"
478     AC_CHECK_LIB(tcl8.3, TclInterpInit,, [with_tcl=no])
479     LIBS="$LIBS_save"
480     if test "$with_tcl" != "no"; then
481         CPPFLAGS="$CPPFLAGS_save"
482         LIBS_TCL=-ltcl8.3
483     fi
486 # qt
487 if test "$with_qt" != "no"; then
488     test "$with_qt" = yes && with_qt=
489     AC_CACHE_CHECK([for Qt], [wv_cv_with_qt], [
490         wv_cv_with_qt=no
491         CPPFLAGS_save="$CPPFLAGS"
492         LDFLAGS_save="$LDFLAGS"
493         LIBS_save="$LIBS"
494         for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH; do
495             eval wv_qtdir="$wv_qtdir"
496             CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include -I$wv_qtdir/include/qt3"
497             LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib"
498             LIBS="$LIBS_save -lqt-mt"
499             AC_TRY_LINK([#include <qstring.h>],
500                         [QString x("hello"); return 0; ],
501                         [wv_cv_with_qt=$wv_qtdir; break])
502         done
503         CPPFLAGS="$CPPFLAGS_save"
504         LDFLAGS="$LDFLAGS_save"
505         LIBS="$LIBS_save"
506     ])
507     with_qt=$wv_cv_with_qt
508     if test "$with_qt" != no; then
509         WV_APPEND(CPPFLAGS, -I$with_qt/include -I$with_qt/include/qt3)
510         if [ "$wv_qtdir" != "/usr" ]; then
511                 # never explicitly include /usr/lib
512                 WV_APPEND(LDFLAGS, -L$with_qt/lib)
513         fi
514         WV_APPEND(LIBS_QT, -lqt-mt)
515     fi
516     AC_PATH_PROG(MOC, moc, [moc not found], $with_qt/bin)
519 # valgrind
520 AC_CHECK_PROG(VALGRIND, valgrind, valgrind)
521 AC_CHECK_HEADERS(valgrind/memcheck.h)
523 # xplc
524 if test "$with_xplc" != "no"; then
525     if test "$with_xplc" = ""; then
526         if pkg-config --modversion xplc-${xplc_version}; then
527             WV_APPEND(CPPFLAGS, [`pkg-config --cflags xplc-${xplc_version}`])
528             WV_APPEND(LDFLAGS, [`pkg-config --libs-only-L xplc-${xplc_version}`])
529             AC_CHECK_HEADERS(xplc/core.h,, [with_xplc=no], [#define UNSTABLE])
530             LIBS_save="$LIBS"
531             AC_CHECK_LIB(xplc, XPLC_getServiceManager,
532                                 [LIBS_XPLC="-lxplc-cxx -lxplc"],
533                                 [with_xplc=no])
534             LIBS="$LIBS_save"
535             xplc_pc="xplc-${xplc_version}"
536         else
537             with_xplc='no'
538         fi
539     else
540         WV_APPEND(CPPFLAGS, [-I$with_xplc/include])
541         WV_APPEND(LDFLAGS, [-L$with_xplc])
542         AC_CHECK_HEADERS(xplc/core.h,, [with_xplc=no], [#define UNSTABLE])
543         LIBS_save="$LIBS"
544         AC_CHECK_LIB(xplc, XPLC_getServiceManager,
545                         [LIBS_XPLC="-lxplc-cxx -lxplc"],
546                         [with_xplc=no])
547         LIBS="$LIBS_save"
548         xplc_pc="xplc-${xplc_version}"
549     fi
550     # Not already on the system?  Try building our own.
551     if test "$with_xplc" = "no" && test -d xplc; then
552         WV_APPEND(CPPFLAGS, [-I\$(WVSTREAMS)/xplc/include])
553         WV_APPEND(LDFLAGS, [-L\$(WVSTREAMS)/xplc])
554         AC_CONFIG_SUBDIRS(xplc)
555         build_xplc=yes
556         with_xplc='$(WVSTREAMS)/xplc'
557         xplc_pc='wvxplc'
558         LIBS_XPLC="-lxplc-cxx -lxplc"
559     fi
562 # zlib
563 if test "$with_zlib" != "no"; then
564     AC_CHECK_HEADERS(zlib.h,, [with_zlib=no])
565     AC_CHECK_LIB(z, compress,, [with_zlib=no])
568 # check for missing packages
569 missing_required=
570 missing_devel=
571 if test "$with_dbus" = "no"; then
572     AC_MSG_WARN([DBUS is missing.])
573     missing_devel=yes
575 if test "$with_pam" = "no"; then
576     AC_MSG_WARN([PAM is missing.])
577     missing_devel=yes
579 if test "$with_qt" = "no"; then
580     AC_MSG_WARN([Qt is missing.])
581     missing_devel=yes
583 if test "$with_xplc" = "no"; then
584     AC_MSG_WARN([XPLC is missing.])
585     missing_required="$missing_required XPLC"
587 if test "$VALGRIND" = ""; then
588     AC_MSG_WARN([Valgrind is missing.])
590 if test "$with_openssl" = "no"; then
591     AC_MSG_WARN([OpenSSL is missing.])
592     missing_required="$missing_required OpenSSL>=0.9.7"
594 if test "$with_readline" = "no"; then
595     AC_MSG_WARN([readline is missing.])
597 if test "$with_zlib" = "no"; then
598     AC_MSG_WARN([zlib is missing.])
599     missing_required="$missing_required zlib"
602 if test -n "$missing_required"; then
603     AC_MSG_ERROR([Required dependencies missing:$missing_required])
606 if test "$enable_devel" = "yes"; then
607     if test -n "$missing_devel"; then
608         AC_MSG_ERROR([Some packages required in developer mode are missing.])
609     fi
612 if test "$VALGRIND" != ""; then
613     VALGRIND="valgrind --tool=memcheck --leak-check=yes --num-callers=10 --suppressions=\$(WVSTREAMS_SRC)/wvstreams.supp"
614     if valgrind --help | grep log-file >/dev/null; then
615         VALGRIND="$VALGRIND --log-file=valgrind.log"
616     else
617         VALGRIND="$VALGRIND --logfile=valgrind.log"
618     fi
622 # Find out whether TR1 or Boost are available.
623 AC_CHECK_HEADERS(tr1/functional)
624 AC_CHECK_HEADERS(boost/function.hpp)
626 # When compiling with exceptions disabled and Boost, applications need
627 # to provide an "exception handler", declared here.
628 AC_CHECK_HEADERS(boost/throw_exception.hpp)
630 # Compiler is always posix if invoking this configure script
631 COMPILER_STANDARD=posix
633 AC_SUBST(SO_VERSION)
635 AC_SUBST(enable_debug)
636 AC_SUBST(enable_devel)
637 AC_SUBST(enable_efence)
638 AC_SUBST(enable_fatal_warnings)
639 AC_SUBST(enable_optimization)
640 AC_SUBST(enable_resolver_fork)
641 AC_SUBST(enable_delete_detector)
642 AC_SUBST(enable_verbose)
643 AC_SUBST(enable_warnings)
644 AC_SUBST(enable_testgui)
646 AC_SUBST(with_dbus)
647 AC_SUBST(with_gtk)
648 AC_SUBST(with_openssl)
649 AC_SUBST(with_pam)
650 AC_SUBST(with_readline)
651 AC_SUBST(with_qt)
652 AC_SUBST(with_tcl)
653 AC_SUBST(with_xplc)
654 AC_SUBST(with_zlib)
656 AC_SUBST(LIBS_XPLC)
657 AC_SUBST(LIBS_DBUS)
658 AC_SUBST(LIBS_QT)
659 AC_SUBST(LIBS_PAM)
660 AC_SUBST(LIBS_TCL)
662 AC_SUBST(build_xplc)
663 AC_SUBST(xplc_pc)
665 AC_SUBST(ac_libs)
666 AC_SUBST(COMPILER_STANDARD)
668 AC_DEFINE_UNQUOTED([VERBOSE_PACKAGE_VERSION],["$PACKAGE_VERSION$WEAVER_BUILD_INFO"],[Verbose package version])
670 AC_CONFIG_FILES(config.mk)
671 AC_CONFIG_FILES(gnulib/Makefile)
672 AC_CONFIG_FILES([pkgconfig/libuniconf.pc
673                  pkgconfig/libuniconf-uninstalled.pc
674                  pkgconfig/libwvbase.pc
675                  pkgconfig/libwvbase-uninstalled.pc
676                  pkgconfig/libwvqt.pc
677                  pkgconfig/libwvqt-uninstalled.pc
678                  pkgconfig/libwvstreams.pc
679                  pkgconfig/libwvstreams-uninstalled.pc
680                  pkgconfig/libwvutils.pc
681                  pkgconfig/libwvutils-uninstalled.pc
682                  pkgconfig/libwvtest.pc
683                  pkgconfig/libwvtest-uninstalled.pc])
685 if test "$xplc_pc" = "wvxplc"; then
686     AC_CONFIG_FILES([pkgconfig/wvxplc.pc])
688 AC_CONFIG_HEADERS(include/wvautoconf.h)
690 AC_OUTPUT
692 # Now remove PACKAGE_* macros from include/wvautoconf.h
693 sed 's,^#.*define.*PACKAGE_.*$,/* & */,' include/wvautoconf.h > include/wvautoconf.h.new
694 if test "x$?" = "x0"; then
695     if ! diff include/wvautoconf.h include/wvautoconf.h >/dev/null; then
696         mv include/wvautoconf.h.new include/wvautoconf.h
697     else
698         rm include/wvautoconf.h.new
699     fi