Skip to content
Browse files

sync VW & Stereo build

  • Loading branch information...
1 parent 9ab70ea commit 7bb14749b9a00282ad5ccbaf78155d909f14a5c4 @novas0x2a novas0x2a committed Sep 29, 2009
Showing with 21 additions and 4 deletions.
  1. +6 −0 configure.ac
  2. +2 −0 m4/ax_app.m4
  3. +2 −0 m4/ax_arg.m4
  4. +2 −0 m4/ax_group_pkg.m4
  5. +2 −4 m4/ax_module.m4
  6. +3 −0 m4/ax_pkg.m4
  7. +2 −0 m4/ax_pkg_apple.m4
  8. +2 −0 m4/ax_pkg_boost.m4
View
6 configure.ac
@@ -54,6 +54,12 @@ if test -f ./config.options; then
source ./config.options
fi
+dnl Process all the --with and --enable options here, so the variables are
+dnl available later
+m4_define(AX_DIVERSION_PROCESS_OPTIONS, 42)
+m4_undivert(AX_DIVERSION_PROCESS_OPTIONS)
+
+
##################################################
# Find the necessary programs
View
2 m4/ax_app.m4
@@ -41,11 +41,13 @@ AC_DEFUN([AX_APP],
WANT_APP_$1="$ENABLE_APP_$1"
fi
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
AC_ARG_ENABLE([app-]m4_tolower([[$1]]),
AC_HELP_STRING([--enable-app-]m4_tolower([[$1]]), [enable the $1 app @<:@$3@:>@]),
[ ENABLE_APP_$1=$enableval; WANT_APP_$1=$enableval; ],
[ if test "x$ENABLE_APP_$1" = x; then ENABLE_APP_$1=`/bin/echo -n $3 | tr [A-Z] [a-z]` ; fi ]
)
+ AC_DIVERT_POP()dnl
AC_MSG_CHECKING([whether to build app $1])
ax_app_enable=$ENABLE_APP_$1
View
2 m4/ax_arg.m4
@@ -23,6 +23,7 @@ AC_DEFUN([AX_ARG],
m4_define([type], [m4_toupper([[$1]])])dnl WITH or ENABLE
AS_VAR_PUSHDEF([value], [m4_if(type, [WITH], [], type[_])[]m4_toupper([[$2]])])dnl
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
dnl switch between AC_ARG_(WITH|ENABLE), since I don't think you can indirect
m4_if(type, [WITH],
dnl WITH case.
@@ -36,6 +37,7 @@ AC_DEFUN([AX_ARG],
AC_HELP_STRING([--][]m4_if(yes, [$3], disable, enable)-lower, [$5][ ]m4_ifval([$3],[@<:@$3@:>@])),
[ value=[$enableval] ],
[ AS_VAR_SET_IF([value], [], [value="[$3]"]) ])])
+ AC_DIVERT_POP()dnl
dnl if the tag is none, generate no configure code here
m4_bmatch([$4], [none], [], [dnl
View
2 m4/ax_group_pkg.m4
@@ -21,10 +21,12 @@ AC_DEFUN([AX_GROUP_PKG],
AS_VAR_PUSHDEF([missing], [ax_group_pkg_missing_deps])
AS_VAR_PUSHDEF([bool], [ax_group_pkg_have_pkg_bool])
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
AC_ARG_WITH(m4_tolower([[$1]]),
AC_HELP_STRING([--with-]m4_tolower([[$1]]), [enable searching for the $1 package @<:@auto@:>@]),
[ have_pkg=$withval ]
)
+ AC_DIVERT_POP()dnl
missing=""
m4_if([$2], [], [have_pkg=[no_deps]], AX_LOAD_DEPS(pkg, m4_toupper([[$2]]), missing))
View
6 m4/ax_module.m4
@@ -9,10 +9,6 @@ AC_DEFUN([AX_MODULE],
[
m4_ifdef([_AX_MODULE_PREPARE], [],
[
- realpath() {
- cd "[$]1" 2>/dev/null 1>&2 && pwd
- }
-
abspath() {
if test ${1#/} = [$]1; then
echo "$PWD/[$]1"
@@ -45,11 +41,13 @@ AC_DEFUN([AX_MODULE],
WANT_MODULE_$1="$ENABLE_MODULE_$1"
fi
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
AC_ARG_ENABLE([module-]m4_tolower([[$1]]),
AC_HELP_STRING([--enable-module-]m4_tolower([[$1]]), [enable the $1 module @<:@$4@:>@]),
[ ENABLE_MODULE_$1=$enableval; WANT_MODULE_$1=$enableval; ],
[ if test x"$ENABLE_MODULE_$1" = x; then ENABLE_MODULE_$1=`/bin/echo -n $4 | tr [A-Z] [a-z]` ; fi ]
)
+ AC_DIVERT_POP()dnl
AC_MSG_CHECKING([whether to build module $1])
ax_module_enable=$ENABLE_MODULE_$1
View
3 m4/ax_pkg.m4
@@ -8,10 +8,13 @@ dnl __END_LICENSE__
dnl Usage: AX_PKG(<name>, <dependencies>, <libraries>, <headers>[, <relative include path>, <relative lib path>, <required-functions>])
AC_DEFUN([AX_PKG],
[
+
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
AC_ARG_WITH(m4_tolower([[$1]]),
AC_HELP_STRING([--with-]m4_tolower([[$1]]), [enable searching for the $1 package @<:@auto@:>@]),
[ HAVE_PKG_$1=$withval ]
)
+ AC_DIVERT_POP()dnl
ADD_$1_CPPFLAGS="$PKG_$1_CPPFLAGS"
PKG_$1_CPPFLAGS=""
View
2 m4/ax_pkg_apple.m4
@@ -15,10 +15,12 @@ AC_DEFUN([AX_PKG_APPLE],
AS_VAR_PUSHDEF([pkg_l], [PKG_]pkg[_LIBS])
AS_VAR_PUSHDEF([bool], [ax_pkg_apple_have_pkg_bool])
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
AC_ARG_WITH(m4_tolower(pkg),
AC_HELP_STRING([--with-]m4_tolower(pkg), [enable searching for the pkg package @<:@auto@:>@]),
[ HAVE_PKG_pkg=$withval ]
)
+ AC_DIVERT_POP()dnl
AC_MSG_CHECKING(for package pkg)
View
2 m4/ax_pkg_boost.m4
@@ -8,10 +8,12 @@ dnl __END_LICENSE__
# Usage: AX_PKG_BOOST
AC_DEFUN([AX_PKG_BOOST],
[
+ AC_DIVERT_PUSH(AX_DIVERSION_PROCESS_OPTIONS)dnl
AC_ARG_WITH(boost,
AC_HELP_STRING([--with-boost], [enable searching for the boost package @<:@auto@:>@]),
[ HAVE_PKG_BOOST=$withval ]
)
+ AC_DIVERT_POP()dnl
AC_MSG_CHECKING(for package BOOST)

0 comments on commit 7bb1474

Please sign in to comment.
Something went wrong with that request. Please try again.