WSANOTINITIALISED is an okay error when shutting down WvStreams in win32.
[wvstreams.git] / configure.ac
blobcf2cd0fe2f8f4df40843a1ddb63448df8a5b815d
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 # append to a variable without introducing superfluous white space
6 AC_DEFUN([WV_APPEND],[
7     if test -z "$$1"; then
8         $1="$2"
9     else
10         $1="$$1 $2"
11     fi
14 QT_SEARCH_PATH="
15 $prefix
16 /usr
17 $libdir/qt-3.1
18 $libdir/qt3
19 $libdir/qt
20 $datadir/qt3
21 $datadir/qt
22 /usr
23 /usr/lib/qt3
24 /usr/lib/qt-3.1
25 /usr/share/qt3
26 /usr/lib/qt
27 /usr/share/qt
30 AC_CONFIG_SRCDIR(streams/wvstream.cc)
32 AC_ARG_ENABLE(debug,
33               AC_HELP_STRING([--disable-debug],
34                              [strip debug information]))
36 AC_ARG_ENABLE(fatal-warnings,
37               AC_HELP_STRING([--enable-fatal-warnings],
38                              [turn warnings into errors]))
40 AC_ARG_ENABLE(optimization,
41               AC_HELP_STRING([--disable-optimization],
42                              [optimization options]))
44 AC_ARG_ENABLE(resolver-fork,
45               AC_HELP_STRING([--disable-resolver-fork],
46                              [WvResolver background name resolution (debugging)]))
48 AC_ARG_ENABLE(delete-detector,
49               AC_HELP_STRING([--enable-delete-detector],
50                              [Delete detector (reference counting)]))
52 AC_ARG_ENABLE(warnings,
53               AC_HELP_STRING([--disable-warnings],
54                              [extra warnings]))
56 AC_ARG_ENABLE(testgui,
57               AC_HELP_STRING([--disable-testgui],
58                              [GUI for unit tests]))
60 AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus], [DBUS]))
61 AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl], [OpenSSL >= 0.9.7 (required)]))
62 AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam], [PAM]))
63 AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl], [Tcl]))
64 AC_ARG_WITH(qt, AC_HELP_STRING([--with-qt], [Qt]))
65 xplc_version='0.3.13'
66 if ! pkg-config --modversion xplc-${xplc_version}; then
67     xplc_version='0.3.11'
69 AC_ARG_WITH(xplc, AC_HELP_STRING([--with-xplc], [XPLC ${xplc_version} (required)]))
70 AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [zlib (required)]))
72 AC_ARG_VAR(MOC, [Qt meta object compiler])
73 AC_ARG_VAR(WEAVER_BUILD_INFO, [Extra version info])
75 # avoid autoconf's default values, but keep those the user might have given
76 CFLAGS="$CFLAGS"
77 CXXFLAGS="$CXXFLAGS"
79 AC_PROG_CC
80 AC_PROG_CXX
81 AC_PROG_CPP
82 AC_PROG_CXXCPP
83 AC_PROG_INSTALL
84 AC_PROG_LN_S
85 AC_PROG_MAKE_SET
86 AC_PROG_RANLIB
88 # Detect target build environment
89 AC_CANONICAL_TARGET
90 case "$target" in
91     *-linux*)
92         ARCH_SUBDIRS="linuxstreams"
93         ;;
94     *-sunos*|*-solaris*)
95         ARCH_SUBDIRS=""
96         ac_libs="-lstdc++ -lgcc_s -ldl -lm -lc"
97         ;;
98     *)
99         ARCH_SUBDIRS=""
100         ;;
101 esac
102 AC_SUBST(target)
103 AC_SUBST(ARCH_SUBDIRS)
105 # Detect endianness
106 AC_C_BIGENDIAN
108 # Look for __attribute__ ((deprecated))
109 CPPFLAGS_save="$CPPFLAGS"
110 WV_APPEND(CPPFLAGS, -Werror)
111 AC_MSG_CHECKING(for __attribute__ ((deprecated)))
112 AC_COMPILE_IFELSE(
113 [#include "confdefs.h"
114 void f() __attribute__ ((deprecated));
115 void f()
119 int main()
121     return 0;
124                   [AC_MSG_RESULT([yes])
125                    AC_DEFINE([ATTR_DEPRECATED],
126                              [__attribute__ ((deprecated))],
127                              [Compiler warning on deprecated functions])],
128                   [AC_MSG_RESULT([no])
129                    AC_DEFINE([ATTR_DEPRECATED], [],
130                              [Compiler warning on deprecated functions])])
131 CPPFLAGS="$CPPFLAGS_save"
133 # argp
134 USE_WVSTREAMS_ARGP=0
135 AC_CHECK_HEADERS(argp.h)
136 AC_CHECK_FUNC(argp_parse)
137 if test "$ac_cv_func_argp_parse" != yes \
138     -o "$ac_cv_header_argp_h" != yes ; then
139     (cd argp && ./configure --build="$ac_cv_env_build_alias_value" --host="$ac_cv_env_host_alias_value")
140     USE_WVSTREAMS_ARGP=1
143 # Function checks
144 AC_FUNC_ALLOCA
146 AC_CHECK_HEADERS(execinfo.h)
148 # Check for error_t
149 AC_CHECK_HEADERS([argz.h errno.h])
150 AC_CHECK_TYPE(error_t,, [AC_DEFINE([error_t], [int],
151                                   [Define to a type to use for `error_t' if it is not otherwise available.])
152 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
153     does not typedef error_t.])],dnl `
154 [#if HAVE_ARGZ_H
155 # include <argz.h>
156 #else
157 # if HAVE_ERRNO_H
158 #  include <errno.h>
159 # endif
160 #endif])
162 # Check for size of ethernet addresses
163 AC_CHECK_HEADERS([sys/socket.h])
164 AC_CHECK_HEADERS([net/if.h], [], [],
165 [#include <stdio.h>
166 #if STDC_HEADERS
167 # include <stdlib.h>
168 # include <stddef.h>
169 #else
170 # if HAVE_STDLIB_H
171 #  include <stdlib.h>
172 # endif
173 #endif
174 #if HAVE_SYS_SOCKET_H
175 # include <sys/socket.h>
176 #endif
178 AC_CHECK_HEADERS([net/ethernet.h], [], [],
179 [#include <stdio.h>
180 #if STDC_HEADERS
181 # include <stdlib.h>
182 # include <stddef.h>
183 #else
184 # if HAVE_STDLIB_H
185 #  include <stdlib.h>
186 # endif
187 #endif
188 #if HAVE_SYS_SOCKET_H
189 # include <sys/socket.h>
190 #endif
192 AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
193 [#include <stdio.h>
194 #if STDC_HEADERS
195 # include <stdlib.h>
196 # include <stddef.h>
197 #else
198 # if HAVE_STDLIB_H
199 #  include <stdlib.h>
200 # endif
201 #endif
202 #if HAVE_SYS_SOCKET_H
203 # include <sys/socket.h>
204 #endif
205 #if HAVE_NET_IF_H
206 # include <net/if.h>
207 #endif
209 AC_CHECK_DECL(ETHER_ADDR_LEN,,
210               AC_CHECK_TYPE(ether_addr_t,
211                             AC_DEFINE([ETHER_ADDR_LEN], [sizeof(ether_addr_t)],
212                                       [Size of ethernet address]),
213                             AC_DEFINE([ETHER_ADDR_LEN], [6]),
214 [#include <stdio.h>
215 #if HAVE_SYS_TYPES_H
216 # include <sys/types.h>
217 #endif
218 #if STDC_HEADERS
219 # include <stdlib.h>
220 # include <stddef.h>
221 #else
222 # if HAVE_STDLIB_H
223 #  include <stdlib.h>
224 # endif
225 #endif
226 #if HAVE_SYS_SOCKET_H
227 # include <sys/socket.h>
228 #endif
229 #if HAVE_NET_ETHERNET_H
230 # include <net/ethernet.h>
231 #endif
232 #if HAVE_NET_IF_H
233 # include <net/if.h>
234 #endif
235 #if HAVE_NETINET_IF_ETHER_H
236 # include <netinet/if_ether.h>
237 #endif
239 [#include <stdio.h>
240 #if HAVE_SYS_TYPES_H
241 # include <sys/types.h>
242 #endif
243 #if STDC_HEADERS
244 # include <stdlib.h>
245 # include <stddef.h>
246 #else
247 # if HAVE_STDLIB_H
248 #  include <stdlib.h>
249 # endif
250 #endif
251 #if HAVE_SYS_SOCKET_H
252 # include <sys/socket.h>
253 #endif
254 #if HAVE_NET_ETHERNET_H
255 # include <net/ethernet.h>
256 #endif
257 #if HAVE_NET_IF_H
258 # include <net/if.h>
259 #endif
260 #if HAVE_NETINET_IF_ETHER_H
261 # include <netinet/if_ether.h>
262 #endif
265 # Check for basic Internet support
266 AC_CHECK_HEADERS([netdb.h])
267 AC_CHECK_HEADERS([netinet/in.h])
268 AC_CHECK_HEADERS([netinet/in_systm.h])
269 AC_CHECK_HEADERS([netinet/ip.h], [], [],
270 [#include <stdio.h>
271 #if HAVE_SYS_TYPES_H
272 # include <sys/types.h>
273 #endif
274 #if STDC_HEADERS
275 # include <stdlib.h>
276 # include <stddef.h>
277 #else
278 # if HAVE_STDLIB_H
279 #  include <stdlib.h>
280 # endif
281 #endif
282 #if HAVE_NETINET_IN_H
283 # include <netinet/in.h>
284 #endif
285 #if HAVE_NETINET_IN_SYSTM_H
286 # include <netinet/in_systm.h>
287 #endif
289 AC_CHECK_HEADERS([netinet/tcp.h])
291 # Check for advanced Linux-style modem support
292 AC_CHECK_HEADERS([linux/serial.h])
293 AC_CHECK_FUNCS([cfmakeraw])
295 # Detect hard-linking based on LN_S's behaviour
296 AC_MSG_CHECKING([whether ln works...])
297 case "$LN_S" in
298     ln*) 
299         LN='ln'
300         AC_MSG_RESULT([yes])
301         ;;
302     *)
303         LN="$LN_S"
304         AC_MSG_RESULT([no, using $LN])
305         ;;
306 esac
307 AC_SUBST(LN)
309 # Setting the default language to C++ means that CXX and CXXCPP will be 
310 # used for compile tests.
311 AC_LANG(C++)
313 # __libc_stack_end isn't available to shared libraries with some libc versions
314 AC_MSG_CHECKING([whether __libc_stack_end is public])
315 AH_TEMPLATE([HAVE_LIBC_STACK_END], [Whether libc supports __libc_stack_end])
316 LDFLAGS_save="$LDFLAGS"
317 WV_APPEND(LDFLAGS, [-Wl,-z,defs -shared])
318 HAVE_LIBC_STACK_END=no
319 AC_TRY_LINK([extern const void *__libc_stack_end; ],
320             [volatile const void *x = __libc_stack_end; ],
321             [HAVE_LIBC_STACK_END=yes; ])
322 if test "$HAVE_LIBC_STACK_END" = "yes"; then
323         AC_DEFINE([HAVE_LIBC_STACK_END])
325 AC_MSG_RESULT([$HAVE_LIBC_STACK_END])
326 LDFLAGS="$LDFLAGS_save"
328 # Detect pkg-config
329 AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
330 if test "$PKGCONFIG" = "no"; then
331     if test "$with_xplc" = ""; then
332         AC_MSG_ERROR([pkg-config is not installed])
333     else
334         AC_MSG_WARN([pkg-config is not installed])
335     fi
338 if test "$enable_debug" != "no"; then
339     AC_DEFINE_UNQUOTED(VER_STRING_EXTRA, [" (`whoami`@`hostname`$VER_STRING_EXTRA)"], [Extra version string.])
342 # resolver-fork
343 if test "$enable_resolver_fork" = "no"; then
344     AC_DEFINE(WVRESOLVER_SKIP_FORK,,
345               [Define to disable WvResolver forking for debugging with gdb.])
348 # resolver-fork
349 if test "$enable_delete_detector" = "yes"; then
350     AC_DEFINE(ENABLE_DELETE_DETECTOR,,
351               [Define to enable the XPLC delete detector.])
354 # dbus
355 if test "$with_dbus" != "no"; then
356     WV_APPEND(CPPFLAGS, -DDBUS_API_SUBJECT_TO_CHANGE -Iinclude/dbus-upstream)
357     if test "$with_dbus" = ""; then
358         DBUS_LIBDIR="$(pkg-config --libs-only-L dbus-1 | sed 's/^-L//' | awk '{print $1}')"
359         if test -z "$DBUS_LIBDIR"; then
360             DBUS_LIBDIR=/usr/lib  # Default path for static linking
361         fi
362         WV_APPEND(CPPFLAGS, [`pkg-config --cflags dbus-1`])
363         WV_APPEND(LDFLAGS, [`pkg-config --libs-only-L dbus-1`])
364     else
365         DBUS_LIBDIR=$with_dbus/dbus/.libs
366         WV_APPEND(CPPFLAGS, -I$with_dbus)
367         WV_APPEND(LDFLAGS, -L$DBUS_LIBDIR)
368     fi
370     AC_CHECK_HEADERS(dbus/dbus.h,, [with_dbus=no])
371     LIBS_save="$LIBS"
372     LIBS="$LIBS $DBUS_LIBDIR/libdbus-1.a"
373     with_dbus=no
374     AC_TRY_LINK([extern "C" void dbus_message_new(); ],
375                 [dbus_message_new(); ],
376                 [with_dbus=])
377     LIBS="$LIBS_save"
379     if test "$with_dbus" != "no"; then
380         AC_DEFINE(WITH_DBUS,,
381                   [Define to enable DBUS support.])
382         LIBS_DBUS=$DBUS_LIBDIR/libdbus-1.a
383     fi
386 # BSD sockets, if you're on Solaris
387 AC_CHECK_LIB(socket, bind)
389 # openssl
390 if test "$with_openssl" != "no"; then
391     if test "$with_openssl" != ""; then
392         WV_APPEND(CPPFLAGS, [-I$with_openssl/include])
393         WV_APPEND(LDFLAGS, [-L$with_openssl])
394     fi
395     AC_CHECK_HEADERS(openssl/ssl.h,, [with_openssl=no],
396                      [#define OPENSSL_NO_KRB5])
397     LIBS_save="$LIBS"
398     AC_CHECK_LIB(crypto, X509_free)
399     AC_CHECK_LIB(ssl, SSL_has_matching_session_id,, [with_openssl=no])
400     AC_CHECK_LIB(ssl, POLICY_MAPPING_new,, [with_openssl_policy_mapping=no])
401     if test "$with_openssl_policy_mapping" != "no"; then
402         AC_DEFINE([HAVE_OPENSSL_POLICY_MAPPING], [1],
403             [Whether libssl has the POLICY_MAPPING features (0.9.8 and up)])
404     fi
405     LIBS="$LIBS_save"
406     if test "$with_openssl" != "no"; then
407         LIBS_SSL="-lcrypto -lssl"
408     fi
411 # readline
412 if test "$with_readline" != "no"; then
413     AC_CHECK_HEADERS(readline/readline.h,, [with_readline=no])
414     AC_CHECK_LIB(readline, readline,, [with_readline=no])
417 # pam
418 if test "$with_pam" != "no"; then
419     AC_CHECK_HEADERS(security/pam_appl.h,, [with_pam=no])
420     LIBS_save="$LIBS"
421     AC_CHECK_LIB(pam, pam_start,, [with_pam=no])
422     AC_MSG_CHECKING(for sane PAM implementation)
423     AC_COMPILE_IFELSE(
424 [#include "confdefs.h"
425 #if HAVE_SECURITY_PAM_APPL_H
426 # include <security/pam_appl.h>
427 #endif
429 /* noconv: null PAM conversation function */
430 int noconv(int num_msg, const struct pam_message **msgm,
431         struct pam_response **response, void *userdata)
433     // if you need to ask things, it won't work
434     return PAM_CONV_ERR;
437 int main()
439     struct pam_conv c;
440     c.conv = noconv;
441     return 0;
444                       [AC_MSG_RESULT([yes])
445                        AC_DEFINE([HAVE_BROKEN_PAM], [0])],
446                       [AC_MSG_RESULT([no])
447                        AC_DEFINE([HAVE_BROKEN_PAM], [1],
448                                  [Solaris has a broken PAM implementation])])
449     LIBS="$LIBS_save"
450     if test "$with_pam" != "no" -a "$HAVE_BROKEN_PAM" != "1"; then
451         LIBS_PAM=-lpam
452     fi
455 # tcl
456 if test "$with_tcl" != "no"; then
457     CPPFLAGS_save="$CPPFLAGS"
458     WV_APPEND(CPPFLAGS, -I/usr/include/tcl8.3)
459     AC_CHECK_HEADERS(tcl.h,, [with_tcl=no])
460     LIBS_save="$LIBS"
461     AC_CHECK_LIB(tcl8.3, TclInterpInit,, [with_tcl=no])
462     LIBS="$LIBS_save"
463     if test "$with_tcl" != "no"; then
464         CPPFLAGS="$CPPFLAGS_save"
465         LIBS_TCL=-ltcl8.3
466     fi
469 # qt
470 if test "$with_qt" != "no"; then
471     test "$with_qt" = yes && with_qt=
472     AC_CACHE_CHECK([for Qt], [wv_cv_with_qt], [
473         wv_cv_with_qt=no
474         CPPFLAGS_save="$CPPFLAGS"
475         LDFLAGS_save="$LDFLAGS"
476         LIBS_save="$LIBS"
477         for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH; do
478             eval wv_qtdir="$wv_qtdir"
479             CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include -I$wv_qtdir/include/qt3"
480             LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib"
481             LIBS="$LIBS_save -lqt-mt"
482             AC_TRY_LINK([#include <qstring.h>],
483                         [QString x("hello"); return 0; ],
484                         [wv_cv_with_qt=$wv_qtdir; break])
485         done
486         CPPFLAGS="$CPPFLAGS_save"
487         LDFLAGS="$LDFLAGS_save"
488         LIBS="$LIBS_save"
489     ])
490     with_qt=$wv_cv_with_qt
491     if test "$with_qt" != no; then
492         WV_APPEND(CPPFLAGS, -I$with_qt/include -I$with_qt/include/qt3)
493         if [ "$wv_qtdir" != "/usr" ]; then
494                 # never explicitly include /usr/lib
495                 WV_APPEND(LDFLAGS, -L$with_qt/lib)
496         fi
497         WV_APPEND(LIBS_QT, -lqt-mt)
498     fi
499     AC_PATH_PROG(MOC, moc, [moc not found], $with_qt/bin)
502 # valgrind
503 AC_CHECK_PROG(VALGRIND, valgrind, valgrind)
504 AC_CHECK_HEADERS(valgrind/memcheck.h)
506 # xplc
507 if test "$with_xplc" != "no"; then
508     if test "$with_xplc" = ""; then
509         if pkg-config --modversion xplc-${xplc_version}; then
510             WV_APPEND(CPPFLAGS, [`pkg-config --cflags xplc-${xplc_version}`])
511             WV_APPEND(LDFLAGS, [`pkg-config --libs-only-L xplc-${xplc_version}`])
512             AC_CHECK_HEADERS(xplc/core.h,, [with_xplc=no], [#define UNSTABLE])
513             LIBS_save="$LIBS"
514             AC_CHECK_LIB(xplc, XPLC_getServiceManager,
515                                 [LIBS_XPLC="-lxplc-cxx -lxplc"],
516                                 [with_xplc=no])
517             LIBS="$LIBS_save"
518             xplc_pc="xplc-${xplc_version}"
519         else
520             with_xplc='no'
521         fi
522     else
523         WV_APPEND(CPPFLAGS, [-I$with_xplc/include])
524         WV_APPEND(LDFLAGS, [-L$with_xplc])
525         AC_CHECK_HEADERS(xplc/core.h,, [with_xplc=no], [#define UNSTABLE])
526         LIBS_save="$LIBS"
527         AC_CHECK_LIB(xplc, XPLC_getServiceManager,
528                         [LIBS_XPLC="-lxplc-cxx -lxplc"],
529                         [with_xplc=no])
530         LIBS="$LIBS_save"
531         xplc_pc="xplc-${xplc_version}"
532     fi
535 # zlib
536 if test "$with_zlib" != "no"; then
537     AC_CHECK_HEADERS(zlib.h,, [with_zlib=no])
538     AC_CHECK_LIB(z, compress,, [with_zlib=no])
541 # Find out whether TR1 or Boost are available.
542 AC_CHECK_HEADERS(tr1/functional)
543 AC_CHECK_HEADERS(boost/function.hpp)
545 # When compiling with exceptions disabled and Boost, applications need
546 # to provide an "exception handler", declared here.
547 AC_CHECK_HEADERS(boost/throw_exception.hpp)
549 # check for missing packages
550 missing_required=
551 missing_devel=
552 if test "$with_dbus" = "no"; then
553     AC_MSG_WARN([DBUS is missing.])
554     missing_devel=yes
556 if test "$with_pam" = "no"; then
557     AC_MSG_WARN([PAM is missing.])
558     missing_devel=yes
560 if test "$with_qt" = "no"; then
561     AC_MSG_WARN([Qt is missing.])
562     missing_devel=yes
564 if test "$with_xplc" = "no"; then
565     AC_MSG_WARN([XPLC is missing.])
566     missing_required="$missing_required XPLC"
568 if test "$VALGRIND" = ""; then
569     AC_MSG_WARN([Valgrind is missing.])
571 if test "$with_openssl" = "no"; then
572     AC_MSG_WARN([OpenSSL is missing.])
573     missing_required="$missing_required OpenSSL>=0.9.7"
575 if test "$with_readline" = "no"; then
576     AC_MSG_WARN([readline is missing.])
578 if test "$with_zlib" = "no"; then
579     AC_MSG_WARN([zlib is missing.])
580     missing_required="$missing_required zlib"
582 if test "$ac_cv_header_tr1_functional" != "yes" \
583      -a "$ac_cv_header_boost_function_hpp" != "yes"; then
584     AC_MSG_WARN([both tr1/functional and boost/function.hpp are missing.])
585     missing_required="$missing_required boost/function.hpp"
588 if test -n "$missing_required"; then
589     AC_MSG_ERROR([Required dependencies missing:$missing_required])
592 if test "$VALGRIND" != ""; then
593     VALGRIND="valgrind --tool=memcheck --leak-check=yes --num-callers=10 --suppressions=\$(WVSTREAMS_SRC)/wvstreams.supp"
594     if valgrind --help | grep log-file >/dev/null; then
595         VALGRIND="$VALGRIND --log-file=valgrind.log"
596     else
597         VALGRIND="$VALGRIND --logfile=valgrind.log"
598     fi
602 # Compiler is always posix if invoking this configure script
603 COMPILER_STANDARD=posix
605 AC_SUBST(SO_VERSION)
607 AC_SUBST(USE_WVSTREAMS_ARGP)
609 AC_SUBST(enable_debug)
610 AC_SUBST(enable_optimization)
611 AC_SUBST(enable_resolver_fork)
612 AC_SUBST(enable_delete_detector)
613 AC_SUBST(enable_warnings)
614 AC_SUBST(enable_testgui)
616 AC_SUBST(with_dbus)
617 AC_SUBST(with_openssl)
618 AC_SUBST(with_openssl_policy_mapping)
619 AC_SUBST(with_pam)
620 AC_SUBST(with_readline)
621 AC_SUBST(with_qt)
622 AC_SUBST(with_tcl)
623 AC_SUBST(with_xplc)
624 AC_SUBST(with_zlib)
626 AC_SUBST(LIBS_XPLC)
627 AC_SUBST(LIBS_DBUS)
628 AC_SUBST(LIBS_QT)
629 AC_SUBST(LIBS_PAM)
630 AC_SUBST(LIBS_TCL)
632 AC_SUBST(xplc_pc)
634 AC_SUBST(ac_libs)
635 AC_SUBST(COMPILER_STANDARD)
637 AC_DEFINE_UNQUOTED([VERBOSE_PACKAGE_VERSION],["$PACKAGE_VERSION$WEAVER_BUILD_INFO"],[Verbose package version])
639 AC_CONFIG_FILES(config.mk)
640 AC_CONFIG_FILES([pkgconfig/libuniconf.pc
641                  pkgconfig/libuniconf-uninstalled.pc
642                  pkgconfig/libwvbase.pc
643                  pkgconfig/libwvbase-uninstalled.pc
644                  pkgconfig/libwvdbus.pc
645                  pkgconfig/libwvdbus-uninstalled.pc
646                  pkgconfig/libwvqt.pc
647                  pkgconfig/libwvqt-uninstalled.pc
648                  pkgconfig/libwvstreams.pc
649                  pkgconfig/libwvstreams-uninstalled.pc
650                  pkgconfig/libwvutils.pc
651                  pkgconfig/libwvutils-uninstalled.pc
652                  pkgconfig/libwvtest.pc
653                  pkgconfig/libwvtest-uninstalled.pc])
655 AC_CONFIG_HEADERS(include/wvautoconf.h)
657 AC_OUTPUT
659 # Now convert PACKAGE_* macros into WVPACKAGE_* in include/wvautoconf.h
660 sed 's,\(\#define.*\)PACKAGE,\1WVPACKAGE,' include/wvautoconf.h > include/wvautoconf.h.new
661 if test "x$?" = "x0"; then
662     if ! diff include/wvautoconf.h include/wvautoconf.h.new >/dev/null; then
663         mv include/wvautoconf.h.new include/wvautoconf.h
664     else
665         rm include/wvautoconf.h.new
666     fi