Permalink
Browse files

fix annoying bug in build.

drop the lame ADD_*_CPPFLAGS and FORCE_*_LDFLAGS for the less weird
PKG_*_CPPFLAGS and PKG_*_LDFLAGS.

Also, in the process, fix an annoying bug where setting PKG_FOO_CPPFLAGS
(where FOO can be fulfilled by BAR and BAZ) wouldn't be propagated to
PKG_BAR_CPPFLAGS. This way, people don't have to know which of the
alternatives to pass in CPPFLAGS/LDFLAGS for.
  • Loading branch information...
1 parent d72a887 commit 6702c2b0807b51590d588573dea1e1c67a06f64e @novas0x2a novas0x2a committed Jan 26, 2009
Showing with 18 additions and 18 deletions.
  1. +3 −3 config.options.columbia
  2. +4 −4 config.options.example
  3. +1 −1 configure.ac
  4. +5 −5 m4/ax_pkg.m4
  5. +5 −5 m4/ax_pkg_one_of.m4
View
@@ -40,9 +40,9 @@ HAVE_PKG_SPICE=$VTO_PKGS/src/cspice
HAVE_PKG_GEOS=$VTO_PKGS/$IRG_ARCH/geos-3.0.0
HAVE_PKG_XERCESC=$VTO_PKGS/$IRG_ARCH/xerces-c-src_2_8_0
-FORCE_QWT_LDFLAGS="-L/u/vto/projects/packages/ia64_linux_gcc4.1/qwt-5.1.1/lib -lqwt"
-FORCE_GSL_LDFLAGS="-L/u/vto/projects/packages/ia64_linux_gcc4.1/gsl-1.11/lib -lgsl -lgslcblas"
-FORCE_SUPERLU_LDFLAGS="-L/u/vto/projects/packages/src/SuperLU_3.0 -lsuperlu_3.0"
+PKG_QWT_LDFLAGS="-L/u/vto/projects/packages/ia64_linux_gcc4.1/qwt-5.1.1/lib -lqwt"
+PKG_GSL_LDFLAGS="-L/u/vto/projects/packages/ia64_linux_gcc4.1/gsl-1.11/lib -lgsl -lgslcblas"
+PKG_SUPERLU_LDFLAGS="-L/u/vto/projects/packages/src/SuperLU_3.0 -lsuperlu_3.0"
# Lapack still needs to be found the old-fashioned way
PKG_PATHS="$VTO_PKGS/$IRG_ARCH/VisionWorkbench-LAPACK-1.0.0"
View
@@ -88,13 +88,13 @@
# Alternative command-line syntax: --with-pkg-libs[=val], --with-pkg-cppflags[=val]
#
# Set cppflags to prepend to the cppflags, and libs to override the libs. If
-# FORCE_PKGNAME_LDFLAGS is set, it will prevent configure from searching for
+# PKG_PKGNAME_LDFLAGS is set, it will prevent configure from searching for
# PKGNAME. A basic check is done, to make sure that the libraries you
# passed in exist, but they are not checked for the required symbols. You should
# independently verify that they provide them.
-#ADD_PKGNAME_CPPFLAGS=-I/path/to/headers
-#FORCE_PKGNAME_LDFLAGS=-L/path/to/libs -lmylib
+#PKG_PKGNAME_CPPFLAGS=-I/path/to/headers
+#PKG_PKGNAME_LDFLAGS=-L/path/to/libs -lmylib
#
# or even, if you need it (use sparingly):
-#FORCE_PKGNAME_LDFLAGS=/path/to/required/lib.so
+#PKG_PKGNAME_LDFLAGS=/path/to/required/lib.so
View
@@ -157,7 +157,7 @@ if test x"$HAVE_PKG_QT_INCLUDE" != x"no"; then
fi
# We seed QT_INCLUDE's cppflags with the ones qmake figured out
-ADD_QT_INCLUDE_CPPFLAGS="$ADD_QT_INCLUDE_CPPFLAGS $QT_CPPFLAGS"
+PKG_QT_INCLUDE_CPPFLAGS="$PKG_QT_INCLUDE_CPPFLAGS $QT_CPPFLAGS"
AX_PKG(QT_INCLUDE, [], [], [QVector])
AX_PKG_ONE_OF(QT,
View
@@ -27,10 +27,10 @@ AC_DEFUN([AX_PKG],
AC_MSG_RESULT([no (disabled by user)])
else
- if test -z "${FORCE_$1_LDFLAGS}"; then
+ if test -z "${PKG_$1_LDFLAGS}"; then
PKG_$1_LIBS="$3"
else
- PKG_$1_LIBS="${FORCE_$1_LDFLAGS}"
+ PKG_$1_LIBS="${PKG_$1_LDFLAGS}"
fi
# Test for and inherit from dependencies
@@ -65,7 +65,7 @@ AC_DEFUN([AX_PKG],
AC_MSG_RESULT([searching...])
fi
- if test -n "${FORCE_$1_LDFLAGS}"; then
+ if test -n "${PKG_$1_LDFLAGS}"; then
PKG_PATHS_$1=""
elif test -n "${HAVE_PKG_$1}" && test "${HAVE_PKG_$1}" != "yes" && test "${HAVE_PKG_$1}" != "no"; then
PKG_PATHS_$1=${HAVE_PKG_$1}
@@ -113,9 +113,9 @@ AC_DEFUN([AX_PKG],
fi
if test -z "$5"; then
- TRY_ADD_CPPFLAGS="$ADD_$1_CPPFLAGS -I$path/${AX_INCLUDE_DIR}"
+ TRY_ADD_CPPFLAGS="$PKG_$1_CPPFLAGS -I$path/${AX_INCLUDE_DIR}"
else
- TRY_ADD_CPPFLAGS="$ADD_$1_CPPFLAGS -I$path/${AX_INCLUDE_DIR}/$5"
+ TRY_ADD_CPPFLAGS="$PKG_$1_CPPFLAGS -I$path/${AX_INCLUDE_DIR}/$5"
fi
if test -d $path/${AX_LIBDIR}; then
View
@@ -7,9 +7,9 @@ AC_DEFUN([AX_PKG_ONE_OF],
0, [m4_fatal([$0: too few arguments: $#])],
2, [m4_ifset([$2], [m4_fatal([$0: too few arguments: [$1] [$2] $#])], [$0([$1])])],
1, [AX_GROUP_PKG([$1])],
- [$3
- AS_VAR_PUSHDEF([has_dep], [HAVE_PKG_]$2)
- AS_IF([test x"$has_dep" = "xyes"], [AX_GROUP_PKG([$1], [$2])],
- [$0([$1], m4_shiftn(3, $@))])
- AS_VAR_POPDEF([has_dep])]
+ [AS_IF([test ! -z "$PKG_$1_CPPFLAGS"], [PKG_$2_CPPFLAGS="$PKG_$2_CPPFLAGS $PKG_$1_CPPFLAGS"])
+ AS_IF([test ! -z "$PKG_$1_LDFLAGS"], [PKG_$2_LDFLAGS="$PKG_$2_LDFLAGS $PKG_$1_LDFLAGS"])
+ $3
+ AS_IF([test x"$HAVE_PKG_$2" = "xyes"], [AX_GROUP_PKG([$1], [$2])],
+ [$0([$1], m4_shiftn(3, $@))])]
)])

0 comments on commit 6702c2b

Please sign in to comment.