subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1131431 - /subversion/trunk/configure.ac
Date Sat, 04 Jun 2011 16:45:29 GMT
Author: danielsh
Date: Sat Jun  4 16:45:29 2011
New Revision: 1131431

URL: http://svn.apache.org/viewvc?rev=1131431&view=rev
Log:
* configure.ac (--with-libmagic):
    Allow passing --with-libmagic with no arguments, with the same
    "Look for libmagic in the usual places, and fail hard if it's not
    found" semantics we use elsewhere.

Modified:
    subversion/trunk/configure.ac

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1131431&r1=1131430&r2=1131431&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Sat Jun  4 16:45:29 2011
@@ -694,7 +694,12 @@ AC_ARG_WITH(libmagic,AS_HELP_STRING([--w
                                 [libmagic filetype detection library]),
 [
   if test "$withval" = "yes" ; then
-    AC_MSG_ERROR([--with-libmagic requires an argument.])
+    AC_CHECK_HEADER(magic.h, [
+      AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
+    ])
+    if test "$libmagic_found" = "no"; then
+      AC_MSG_ERROR([[--with-libmagic requested, but libmagic not found]])
+    fi
   else
     libmagic_prefix=$withval
     save_cppflags="$CPPFLAGS"



Mime
View raw message