[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH]: Check return values of ap[ru]-config

From: Daniel Berlin <dan_at_dberlin.org>
Date: 2002-02-18 20:10:58 CET

Rather than just get a random sed error creating makefiles or something if
ap[ru]-config fails, let's just check the return value and issue error
messages if it failed.

2002-02-18 Daniel Berlin <dan@dberlin.org>

        * apr.m4: Test return value of apr-config, rather than assuming
        it passed. Issue error messages if it failed.

        * aprutil.m4: Ditto for apu-config.

Index: ./aprutil.m4
===================================================================
--- ./aprutil.m4
+++ ./aprutil.m4 Mon Feb 18 14:05:38 2002
@@ -29,10 +29,20 @@
   dnl Get libraries and thread flags from APRUTIL ---------------------
 
   LDFLAGS="$LDFLAGS `$apu_config --ldflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apu-config --ldflags failed])
+ fi
 
   SVN_EXTRA_INCLUDES="$SVN_EXTRA_INCLUDES `$apu_config --includes`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apu-config --includes failed])
+ fi
 
   SVN_APRUTIL_LIBS="`$apu_config --link-libtool --libs`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apu-config --link-libtool --libs failed])
+ fi
+
   AC_SUBST(SVN_APRUTIL_LIBS)
 ])
 
Index: ./apr.m4
===================================================================
--- ./apr.m4
+++ ./apr.m4 Mon Feb 18 14:04:10 2002
@@ -24,13 +24,35 @@
   dnl Get build information from APR
 
   CPPFLAGS="$CPPFLAGS `$apr_config --cppflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --cppflags failed])
+ fi
+
   CFLAGS="$CFLAGS `$apr_config --cflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --cflags failed])
+ fi
+
   LDFLAGS="$LDFLAGS `$apr_config --ldflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --ldflags failed])
+ fi
+
   LIBS="$LIBS `$apr_config --libs`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --libs failed])
+ fi
 
   SVN_EXTRA_INCLUDES="$SVN_EXTRA_INCLUDES `$apr_config --includes`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --includes failed])
+ fi
 
   SVN_APR_LIBS="`$apr_config --link-libtool`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --link-libtool failed])
+ fi
+
   AC_SUBST(SVN_APR_LIBS)
 ])
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.