autoconf-archive-maintainers | |
[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #7490] Allow overriding AX_PATH_GENERIC checks
From: |
Vadim Zeitlin |
Subject: |
[patch #7490] Allow overriding AX_PATH_GENERIC checks |
Date: |
Sun, 06 Mar 2011 17:41:55 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729) |
URL:
<http://savannah.gnu.org/patch/?7490>
Summary: Allow overriding AX_PATH_GENERIC checks
Project: GNU Autoconf Archive
Submitted by: zeitlin
Submitted on: Sun 06 Mar 2011 06:41:54 PM CET
Priority: 4
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The attached patch allows to set LIBRARY_LIBS and LIBRARY_CFLAGS variables on
configure command line or in the environment to override the normal values
returned by `library-config --libs` and `--cflags` respectively.
The patch is a bit difficult to read because of the indentation changes but
the real change is quite trivial, here it is (without the changes in the
documentation comment):
% git diff -w
diff --git a/m4/ax_path_generic.m4 b/m4/ax_path_generic.m4
index 4db2da1..809855b 100644
--- a/m4/ax_path_generic.m4
+++ b/m4/ax_path_generic.m4
@@ -75,6 +89,13 @@ AC_DEFUN([AX_PATH_GENERIC],[
AC_ARG_VAR(UP[]_CFLAGS, [CFLAGS used for $1])
AC_ARG_VAR(UP[]_LIBS, [LIBS used for $1])
+ AS_IF([test x$UP[]_CFLAGS != x -o x$UP[]_LIBS != x],[
+ dnl Don't run config script at all, use user-provided values instead.
+ AC_SUBST(UP[]_CFLAGS)
+ AC_SUBST(UP[]_LIBS)
+ :
+ $4
+ ],[
AS_IF([test x$DOWN[]_config_exec_prefix != x],[
DOWN[]_config_args="$DOWN[]_config_args
--exec-prefix=$DOWN[]_config_exec_prefix"
AS_IF([test x${UP[]_CONFIG+set} != xset],[
@@ -136,6 +157,7 @@ AC_DEFUN([AX_PATH_GENERIC],[
$4
])
])
+ ])
popdef([UP])
popdef([DOWN])
A typical scenario in which this change could be useful is mentioned in the
comment, see also this thread
<http://thread.gmane.org/gmane.comp.programming.swig/16983>.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 06 Mar 2011 06:41:54 PM CET Name: ax_override_path_generic.diff
Size: 5kB By: zeitlin
<http://savannah.gnu.org/patch/download.php?file_id=22845>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?7490>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [patch #7490] Allow overriding AX_PATH_GENERIC checks,
Vadim Zeitlin <=