autoconf-archive-maintainers | |
[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] add AX_RESTORE_FLAGS and AX_SAVE_FLAGS
From: |
Filippo Giunchedi |
Subject: |
[PATCH] add AX_RESTORE_FLAGS and AX_SAVE_FLAGS |
Date: |
Sat, 9 Jan 2010 21:37:38 +0100 |
shamelessy copied from the great VLC
---
doc/autoconf-archive.texi | 2 ++
m4/ax_restore_flags.m4 | 29 +++++++++++++++++++++++++++++
m4/ax_save_flags.m4 | 29 +++++++++++++++++++++++++++++
3 files changed, 60 insertions(+), 0 deletions(-)
create mode 100644 m4/ax_restore_flags.m4
create mode 100644 m4/ax_save_flags.m4
diff --git a/doc/autoconf-archive.texi b/doc/autoconf-archive.texi
index 46751f6..8ae0d5c 100644
--- a/doc/autoconf-archive.texi
+++ b/doc/autoconf-archive.texi
@@ -471,7 +471,9 @@ The Macros:
* ax_python_module::
* ax_require_one_func::
* ax_rpm_init::
+* ax_restore_flags::
* ax_ruby_devel::
+* ax_save_flags::
* ax_set_default_paths_system::
* ax_short_sleep::
* ax_silent_mode::
diff --git a/m4/ax_restore_flags.m4 b/m4/ax_restore_flags.m4
new file mode 100644
index 0000000..acf0d6c
--- /dev/null
+++ b/m4/ax_restore_flags.m4
@@ -0,0 +1,29 @@
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/ax_restore_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_RESTORE_FLAGS()
+#
+# DESCRIPTION
+#
+# Restore common compilation flags from temporary variables
+#
+# LICENSE
+#
+# Copyright (c) 2009 Filippo Giunchedi <address@hidden>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+AC_DEFUN([AX_RESTORE_FLAGS], [
+ CPPFLAGS="${CPPFLAGS_save}"
+ CFLAGS="${CFLAGS_save}"
+ CXXFLAGS="${CXXFLAGS_save}"
+ OBJCFLAGS="${OBJCFLAGS_save}"
+ LDFLAGS="${LDFLAGS_save}"
+ LIBS="${LIBS_save}"
+])
diff --git a/m4/ax_save_flags.m4 b/m4/ax_save_flags.m4
new file mode 100644
index 0000000..9d598a8
--- /dev/null
+++ b/m4/ax_save_flags.m4
@@ -0,0 +1,29 @@
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/ax_save_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_SAVE_FLAGS()
+#
+# DESCRIPTION
+#
+# Save common compilation flags into temporary variables
+#
+# LICENSE
+#
+# Copyright (c) 2009 Filippo Giunchedi <address@hidden>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+AC_DEFUN([AX_SAVE_FLAGS], [
+ CPPFLAGS_save="${CPPFLAGS}"
+ CFLAGS_save="${CFLAGS}"
+ CXXFLAGS_save="${CXXFLAGS}"
+ OBJCFLAGS_save="${OBJCFLAGS}"
+ LDFLAGS_save="${LDFLAGS}"
+ LIBS_save="${LIBS}"
+])
--
1.6.6
- [PATCH] add AX_RESTORE_FLAGS and AX_SAVE_FLAGS,
Filippo Giunchedi <=