Make WvStreams compile with gcc 4.4.
[wvstreams.git] / configure.ac
blob193575b33d8a12c1c6a96d43fdca5f1d917803fc
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(WvStreams, 4.6, wvstreams-devel@googlegroups.com, wvstreams)
3 SO_VERSION=4.6
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 AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [zlib (required)]))
66 AC_ARG_WITH(valgrind, AC_HELP_STRING([--with-valgrind], [Valgrind]))
68 AC_ARG_VAR(MOC, [Qt meta object compiler])
69 AC_ARG_VAR(WEAVER_BUILD_INFO, [Extra version info])
71 # avoid autoconf's default values, but keep those the user might have given
72 CFLAGS="$CFLAGS"
73 CXXFLAGS="$CXXFLAGS"
75 AC_PROG_CC
76 AC_PROG_CXX
77 AC_PROG_CPP
78 AC_PROG_CXXCPP
79 AC_PROG_INSTALL
80 AC_PROG_LN_S
81 AC_PROG_MAKE_SET
82 AC_PROG_RANLIB
84 # Detect target build environment
85 AC_CANONICAL_TARGET
86 case "$target" in
87     *-linux*)
88         ARCH_SUBDIRS="linuxstreams"
89         OS="LINUX"
90         ;;
91     *-sunos*|*-solaris*)
92         ARCH_SUBDIRS=""
93         ac_libs="-lstdc++ -lgcc_s -ldl -lm -lc"
94         OS="SOLARIS"
95         ;;
96     *-win*|*-mingw32*)
97         ARCH_SUBDIRS="win32"
98         OS="WIN32"
99         ;;
100     *-apple*)
101         ARCH_SUBDIRS=""
102         OS="MACOS"
103         ;;
104     *)
105         ARCH_SUBDIRS=""
106         OS="OTHER"
107         ;;
108 esac
110 AC_SUBST(target)
111 AC_SUBST(ARCH_SUBDIRS)
112 AC_SUBST(OS)
114 # Detect endianness
115 AC_C_BIGENDIAN
117 # Look for __attribute__ ((deprecated))
118 CPPFLAGS_save="$CPPFLAGS"
119 WV_APPEND(CPPFLAGS, -Werror)
120 AC_MSG_CHECKING(for __attribute__ ((deprecated)))
121 AC_COMPILE_IFELSE(
122 [#include "confdefs.h"
123 void f() __attribute__ ((deprecated));
124 void f()
128 int main()
130     return 0;
133                   [AC_MSG_RESULT([yes])
134                    AC_DEFINE([ATTR_DEPRECATED],
135                              [__attribute__ ((deprecated))],
136                              [Compiler warning on deprecated functions])],
137                   [AC_MSG_RESULT([no])
138                    AC_DEFINE([ATTR_DEPRECATED], [],
139                              [Compiler warning on deprecated functions])])
140 CPPFLAGS="$CPPFLAGS_save"
142 # argp
143 USE_WVSTREAMS_ARGP=0
144 AC_CHECK_HEADERS(argp.h)
145 AC_CHECK_FUNC(argp_parse)
146 if test "$ac_cv_func_argp_parse" != yes \
147     -o "$ac_cv_header_argp_h" != yes ; then
148     (
149         echo
150         echo 'configuring argp...'
151         cd argp
152         ./configure --host=$host_cpu-$host_os || exit $?
153         echo 'argp configured.'
154         echo
155     ) || exit $?
156     USE_WVSTREAMS_ARGP=1
159 # Function checks
160 AC_HEADER_DIRENT
162 AC_FUNC_ALLOCA
164 AC_CHECK_HEADERS(execinfo.h)
166 # Check for error_t
167 AC_CHECK_HEADERS([argz.h errno.h])
168 AC_CHECK_TYPE(error_t,, [AC_DEFINE([error_t], [int],
169                                   [Define to a type to use for `error_t' if it is not otherwise available.])
170 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
171     does not typedef error_t.])],dnl `
172 [#if HAVE_ARGZ_H
173 # include <argz.h>
174 #else
175 # if HAVE_ERRNO_H
176 #  include <errno.h>
177 # endif
178 #endif])
180 # Check for size of ethernet addresses
181 AC_CHECK_HEADERS([sys/socket.h])
182 AC_CHECK_HEADERS([net/if.h], [], [],
183 [#include <stdio.h>
184 #if STDC_HEADERS
185 # include <stdlib.h>
186 # include <stddef.h>
187 #else
188 # if HAVE_STDLIB_H
189 #  include <stdlib.h>
190 # endif
191 #endif
192 #if HAVE_SYS_SOCKET_H
193 # include <sys/socket.h>
194 #endif
196 AC_CHECK_HEADERS([net/ethernet.h], [], [],
197 [#include <stdio.h>
198 #if STDC_HEADERS
199 # include <stdlib.h>
200 # include <stddef.h>
201 #else
202 # if HAVE_STDLIB_H
203 #  include <stdlib.h>
204 # endif
205 #endif
206 #if HAVE_SYS_SOCKET_H
207 # include <sys/socket.h>
208 #endif
210 AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
211 [#include <stdio.h>
212 #if STDC_HEADERS
213 # include <stdlib.h>
214 # include <stddef.h>
215 #else
216 # if HAVE_STDLIB_H
217 #  include <stdlib.h>
218 # endif
219 #endif
220 #if HAVE_SYS_SOCKET_H
221 # include <sys/socket.h>
222 #endif
223 #if HAVE_NET_IF_H
224 # include <net/if.h>
225 #endif
227 AC_CHECK_DECL(ETHER_ADDR_LEN,,
228               AC_CHECK_TYPE(ether_addr_t,
229                             AC_DEFINE([ETHER_ADDR_LEN], [sizeof(ether_addr_t)],
230                                       [Size of ethernet address]),
231                             AC_DEFINE([ETHER_ADDR_LEN], [6]),
232 [#include <stdio.h>
233 #if HAVE_SYS_TYPES_H
234 # include <sys/types.h>
235 #endif
236 #if STDC_HEADERS
237 # include <stdlib.h>
238 # include <stddef.h>
239 #else
240 # if HAVE_STDLIB_H
241 #  include <stdlib.h>
242 # endif
243 #endif
244 #if HAVE_SYS_SOCKET_H
245 # include <sys/socket.h>
246 #endif
247 #if HAVE_NET_ETHERNET_H
248 # include <net/ethernet.h>
249 #endif
250 #if HAVE_NET_IF_H
251 # include <net/if.h>
252 #endif
253 #if HAVE_NETINET_IF_ETHER_H
254 # include <netinet/if_ether.h>
255 #endif
257 [#include <stdio.h>
258 #if HAVE_SYS_TYPES_H
259 # include <sys/types.h>
260 #endif
261 #if STDC_HEADERS
262 # include <stdlib.h>
263 # include <stddef.h>
264 #else
265 # if HAVE_STDLIB_H
266 #  include <stdlib.h>
267 # endif
268 #endif
269 #if HAVE_SYS_SOCKET_H
270 # include <sys/socket.h>
271 #endif
272 #if HAVE_NET_ETHERNET_H
273 # include <net/ethernet.h>
274 #endif
275 #if HAVE_NET_IF_H
276 # include <net/if.h>
277 #endif
278 #if HAVE_NETINET_IF_ETHER_H
279 # include <netinet/if_ether.h>
280 #endif
283 # Check for basic Internet support
284 AC_CHECK_HEADERS([netdb.h])
285 AC_CHECK_HEADERS([netinet/in.h])
286 AC_CHECK_HEADERS([netinet/in_systm.h])
287 AC_CHECK_HEADERS([netinet/ip.h], [], [],
288 [#include <stdio.h>
289 #if HAVE_SYS_TYPES_H
290 # include <sys/types.h>
291 #endif
292 #if STDC_HEADERS
293 # include <stdlib.h>
294 # include <stddef.h>
295 #else
296 # if HAVE_STDLIB_H
297 #  include <stdlib.h>
298 # endif
299 #endif
300 #if HAVE_NETINET_IN_H
301 # include <netinet/in.h>
302 #endif
303 #if HAVE_NETINET_IN_SYSTM_H
304 # include <netinet/in_systm.h>
305 #endif
307 AC_CHECK_HEADERS([netinet/tcp.h])
309 # Check for advanced Linux-style modem support
310 AC_CHECK_HEADERS([linux/serial.h])
311 AC_CHECK_FUNCS([cfmakeraw])
313 # Detect hard-linking based on LN_S's behaviour
314 AC_MSG_CHECKING([whether ln works...])
315 case "$LN_S" in
316     ln*) 
317         LN='ln'
318         AC_MSG_RESULT([yes])
319         ;;
320     *)
321         LN="$LN_S"
322         AC_MSG_RESULT([no, using $LN])
323         ;;
324 esac
325 AC_SUBST(LN)
327 # Setting the default language to C++ means that CXX and CXXCPP will be 
328 # used for compile tests.
329 AC_LANG(C++)
331 # __libc_stack_end isn't available to shared libraries with some libc versions
332 AC_MSG_CHECKING([whether __libc_stack_end is public])
333 AH_TEMPLATE([HAVE_LIBC_STACK_END], [Whether libc supports __libc_stack_end])
334 LDFLAGS_save="$LDFLAGS"
335 WV_APPEND(LDFLAGS, [-Wl,-z,defs -shared])
336 HAVE_LIBC_STACK_END=no
337 AC_TRY_LINK([extern const void *__libc_stack_end; ],
338             [volatile const void *x = __libc_stack_end; ],
339             [HAVE_LIBC_STACK_END=yes; ])
340 if test "$HAVE_LIBC_STACK_END" = "yes"; then
341         AC_DEFINE([HAVE_LIBC_STACK_END])
343 AC_MSG_RESULT([$HAVE_LIBC_STACK_END])
344 LDFLAGS="$LDFLAGS_save"
346 # Detect pkg-config
347 AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
348 if test "$PKGCONFIG" = "no"; then
349     AC_MSG_WARN([pkg-config is not installed])
352 if test "$enable_debug" != "no"; then
353     AC_DEFINE_UNQUOTED(VER_STRING_EXTRA, [" (`whoami`@`hostname`$VER_STRING_EXTRA)"], [Extra version string.])
356 # resolver-fork
357 if test "$enable_resolver_fork" = "no"; then
358     AC_DEFINE(WVRESOLVER_SKIP_FORK,,
359               [Define to disable WvResolver forking for debugging with gdb.])
362 # xplc delete detector
363 if test "$enable_delete_detector" = "yes"; then
364     AC_DEFINE(ENABLE_DELETE_DETECTOR,,
365               [Define to enable the XPLC delete detector.])
368 # dbus
369 if test "$with_dbus" != "no"; then        
370     if test "$with_dbus" = "" -o "$with_dbus" = "yes"; then
371         AC_MSG_CHECKING([Checking that D-Bus version greater than 1.2.14 installed.])
372         if pkg-config --atleast-version 1.2.14 dbus-1; then
373             WV_APPEND(CPPFLAGS, [`pkg-config --cflags dbus-1`])
374             WV_APPEND(LDFLAGS, [`pkg-config --libs dbus-1`])
375             AC_MSG_RESULT([yes])
376         else
377             with_dbus=no
378             AC_MSG_RESULT([no])
379         fi
380     else
381         # no version check when doing --with-dbus
382         DBUS_LIBDIR=$with_dbus/dbus/.libs
383         WV_APPEND(CPPFLAGS, -I$with_dbus)
384         WV_APPEND(LDFLAGS, -L$DBUS_LIBDIR)
385         WV_APPEND(LIBS, -ldbus-1)
386     fi
388     # double check that we actually have D-Bus
389     if test "$with_dbus" != "no"; then
390         AC_CHECK_HEADERS(dbus/dbus.h,, [with_dbus=no])
391         with_dbus=no
392         AC_TRY_LINK([extern "C" void dbus_message_new(); ],
393                     [dbus_message_new(); ],
394                     [with_dbus=])
395     fi
397     if test "$with_dbus" != "no"; then
398         AC_DEFINE(WITH_DBUS,,
399                   [Define to enable DBUS support.])
400         LIBS_DBUS=$DBUS_LIBDIR/libdbus-1.a
401     fi
404 # BSD sockets, if you're on Solaris
405 AC_CHECK_LIB(socket, bind)
407 # openssl
408 if test "$with_openssl" != "no"; then
409     if test "$with_openssl" != ""; then
410         WV_APPEND(CPPFLAGS, [-I$with_openssl/include])
411         WV_APPEND(LDFLAGS, [-L$with_openssl])
412     fi
413     AC_CHECK_HEADERS(openssl/ssl.h,, [with_openssl=no],
414                      [#define OPENSSL_NO_KRB5])
415     LIBS_save="$LIBS"
416     AC_CHECK_LIB(crypto, X509_free)
417     AC_CHECK_LIB(ssl, SSL_has_matching_session_id,, [with_openssl=no])
418     AC_CHECK_LIB(ssl, POLICY_MAPPING_new,, [with_openssl_policy_mapping=no])
419     if test "$with_openssl_policy_mapping" != "no"; then
420         AC_DEFINE([HAVE_OPENSSL_POLICY_MAPPING], [1],
421             [Whether libssl has the POLICY_MAPPING features (0.9.8 and up)])
422     fi
423     LIBS="$LIBS_save"
424     if test "$with_openssl" != "no"; then
425         LIBS_SSL="-lcrypto -lssl"
426     fi
429 # readline
430 if test "$with_readline" != "no"; then
431     AC_CHECK_HEADERS(readline/readline.h,, [with_readline=no])
432     AC_CHECK_LIB(readline, readline,, [with_readline=no])
435 # pam
436 if test "$with_pam" != "no"; then
437     AC_CHECK_HEADERS(security/pam_appl.h,, [with_pam=no])
438     LIBS_save="$LIBS"
439     AC_CHECK_LIB(pam, pam_start,, [with_pam=no])
440     AC_MSG_CHECKING(for sane PAM implementation)
441     AC_COMPILE_IFELSE(
442 [#include "confdefs.h"
443 #if HAVE_SECURITY_PAM_APPL_H
444 # include <security/pam_appl.h>
445 #endif
447 /* noconv: null PAM conversation function */
448 int noconv(int num_msg, const struct pam_message **msgm,
449         struct pam_response **response, void *userdata)
451     // if you need to ask things, it won't work
452     return PAM_CONV_ERR;
455 int main()
457     struct pam_conv c;
458     c.conv = noconv;
459     return 0;
462                       [AC_MSG_RESULT([yes])
463                        AC_DEFINE([HAVE_BROKEN_PAM], [0])],
464                       [AC_MSG_RESULT([no])
465                        AC_DEFINE([HAVE_BROKEN_PAM], [1],
466                                  [Solaris has a broken PAM implementation])])
467     LIBS="$LIBS_save"
468     if test "$with_pam" != "no" -a "$HAVE_BROKEN_PAM" != "1"; then
469         LIBS_PAM=-lpam
470     fi
473 # tcl
474 if test "$with_tcl" != "no"; then
475     CPPFLAGS_save="$CPPFLAGS"
476     WV_APPEND(CPPFLAGS, -I/usr/include/tcl8.3)
477     AC_CHECK_HEADERS(tcl.h,, [with_tcl=no])
478     LIBS_save="$LIBS"
479     AC_CHECK_LIB(tcl8.3, TclInterpInit,, [with_tcl=no])
480     LIBS="$LIBS_save"
481     if test "$with_tcl" != "no"; then
482         CPPFLAGS="$CPPFLAGS_save"
483         LIBS_TCL=-ltcl8.3
484     fi
487 # qt
488 if test "$with_qt" != "no"; then
489     test "$with_qt" = yes && with_qt=
490     AC_CACHE_CHECK([for Qt], [wv_cv_with_qt], [
491         wv_cv_with_qt=no
492         CPPFLAGS_save="$CPPFLAGS"
493         LDFLAGS_save="$LDFLAGS"
494         LIBS_save="$LIBS"
495         for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH $(pkg-config --variable=prefix qt-mt); do
496             eval wv_qtdir="$wv_qtdir"
497             CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include -I$wv_qtdir/include/qt3"
498             LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib"
499             LIBS="$LIBS_save -lqt-mt"
500             AC_TRY_LINK([#include <qstring.h>],
501                         [QString x("hello"); return 0; ],
502                         [wv_cv_with_qt=$wv_qtdir; break])
503         done
504         CPPFLAGS="$CPPFLAGS_save"
505         LDFLAGS="$LDFLAGS_save"
506         LIBS="$LIBS_save"
507     ])
508     with_qt=$wv_cv_with_qt
509     if test "$with_qt" != no; then
510         WV_APPEND(CPPFLAGS, -I$with_qt/include -I$with_qt/include/qt3)
511         if test "$wv_qtdir" != "/usr" ; then
512                 # never explicitly include /usr/lib
513                 WV_APPEND(LDFLAGS, -L$with_qt/lib)
514         fi
515         WV_APPEND(LIBS_QT, -lqt-mt)
516     fi
517     AC_PATH_PROG(MOC, moc, [moc not found], $with_qt/bin)
520 # valgrind
521 if test "$with_valgrind" != "no"; then
522     AC_CHECK_PROG(VALGRIND, valgrind, valgrind)
523     AC_CHECK_HEADERS(valgrind/memcheck.h)
526 # zlib
527 if test "$with_zlib" != "no"; then
528     AC_CHECK_HEADERS(zlib.h,, [with_zlib=no])
529     AC_CHECK_LIB(z, compress,, [with_zlib=no])
532 # Find out whether TR1 or Boost are available.
533 AC_CHECK_HEADERS(tr1/functional)
534 AC_CHECK_HEADERS(boost/function.hpp)
536 # When compiling with exceptions disabled and Boost, applications need
537 # to provide an "exception handler", declared here.
538 AC_CHECK_HEADERS(boost/throw_exception.hpp)
540 # check for missing packages
541 missing_required=
542 missing_devel=
543 if test "$with_dbus" = "no"; then
544     AC_MSG_WARN([DBUS is missing.])
545     missing_devel=yes
547 if test "$with_pam" = "no"; then
548     AC_MSG_WARN([PAM is missing.])
549     missing_devel=yes
551 if test "$with_qt" = "no"; then
552     AC_MSG_WARN([Qt is missing.])
553     missing_devel=yes
555 if test "$VALGRIND" = ""; then
556     AC_MSG_WARN([Valgrind is missing.])
558 if test "$with_openssl" = "no"; then
559     AC_MSG_WARN([OpenSSL is missing.])
560     missing_required="$missing_required OpenSSL>=0.9.7"
562 if test "$with_readline" = "no"; then
563     AC_MSG_WARN([readline is missing.])
565 if test "$with_zlib" = "no"; then
566     AC_MSG_WARN([zlib is missing.])
567     missing_required="$missing_required zlib"
569 if test "$ac_cv_header_tr1_functional" != "yes" \
570      -a "$ac_cv_header_boost_function_hpp" != "yes"; then
571     AC_MSG_WARN([both tr1/functional and boost/function.hpp are missing.])
572     missing_required="$missing_required boost/function.hpp"
575 if test -n "$missing_required"; then
576     AC_MSG_ERROR([Required dependencies missing:$missing_required])
579 if test "$VALGRIND" != ""; then
580     VALGRIND="valgrind --tool=memcheck --leak-check=yes --num-callers=10 --suppressions=\$(WVSTREAMS_SRC)/wvstreams.supp"
581     if valgrind --help | grep log-file >/dev/null; then
582         VALGRIND="$VALGRIND --log-file=valgrind.log"
583     else
584         VALGRIND="$VALGRIND --logfile=valgrind.log"
585     fi
589 # Compiler is always posix if invoking this configure script
590 COMPILER_STANDARD=posix
592 AC_SUBST(SO_VERSION)
594 AC_SUBST(USE_WVSTREAMS_ARGP)
596 AC_SUBST(enable_debug)
597 AC_SUBST(enable_optimization)
598 AC_SUBST(enable_resolver_fork)
599 AC_SUBST(enable_delete_detector)
600 AC_SUBST(enable_warnings)
601 AC_SUBST(enable_testgui)
603 AC_SUBST(with_dbus)
604 AC_SUBST(with_openssl)
605 AC_SUBST(with_openssl_policy_mapping)
606 AC_SUBST(with_pam)
607 AC_SUBST(with_readline)
608 AC_SUBST(with_qt)
609 AC_SUBST(with_tcl)
610 AC_SUBST(with_zlib)
612 AC_SUBST(LIBS_DBUS)
613 AC_SUBST(LIBS_QT)
614 AC_SUBST(LIBS_PAM)
615 AC_SUBST(LIBS_TCL)
617 AC_SUBST(ac_libs)
618 AC_SUBST(COMPILER_STANDARD)
620 AC_DEFINE_UNQUOTED([VERBOSE_PACKAGE_VERSION],["$PACKAGE_VERSION$WEAVER_BUILD_INFO"],[Verbose package version])
622 AC_CONFIG_FILES(config.mk)
623 AC_CONFIG_FILES([pkgconfig/libuniconf.pc
624                  pkgconfig/libuniconf-uninstalled.pc
625                  pkgconfig/libwvbase.pc
626                  pkgconfig/libwvbase-uninstalled.pc
627                  pkgconfig/libwvdbus.pc
628                  pkgconfig/libwvdbus-uninstalled.pc
629                  pkgconfig/libwvqt.pc
630                  pkgconfig/libwvqt-uninstalled.pc
631                  pkgconfig/libwvstreams.pc
632                  pkgconfig/libwvstreams-uninstalled.pc
633                  pkgconfig/libwvutils.pc
634                  pkgconfig/libwvutils-uninstalled.pc
635                  pkgconfig/libwvtest.pc
636                  pkgconfig/libwvtest-uninstalled.pc])
638 AC_CONFIG_HEADERS(include/wvautoconf.h)
640 AC_OUTPUT
642 # Now convert PACKAGE_* macros into WVPACKAGE_* in include/wvautoconf.h
643 sed 's,\(\#define.*\)PACKAGE,\1WVPACKAGE,' include/wvautoconf.h > include/wvautoconf.h.new
644 if test "x$?" = "x0"; then
645     if ! diff include/wvautoconf.h include/wvautoconf.h.new >/dev/null; then
646         mv include/wvautoconf.h.new include/wvautoconf.h
647     else
648         rm include/wvautoconf.h.new
649     fi