aboutsummaryrefslogtreecommitdiffstats
path: root/tools/m4/set_cflags_ldflags.m4
diff options
context:
space:
mode:
Diffstat (limited to 'tools/m4/set_cflags_ldflags.m4')
-rw-r--r--tools/m4/set_cflags_ldflags.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/m4/set_cflags_ldflags.m4 b/tools/m4/set_cflags_ldflags.m4
new file mode 100644
index 0000000000..7e357ba6b4
--- /dev/null
+++ b/tools/m4/set_cflags_ldflags.m4
@@ -0,0 +1,20 @@
+AC_DEFUN([AX_SET_FLAGS],
+[for cflag in $PREPEND_INCLUDES
+do
+ PREPEND_CFLAGS+=" -I$cflag"
+done
+for ldflag in $PREPEND_LIB
+do
+ PREPEND_LDFLAGS+=" -L$ldflag"
+done
+for cflag in $APPEND_INCLUDES
+do
+ APPEND_CFLAGS+=" -I$cflag"
+done
+for ldflag in $APPEND_LIB
+do
+ APPEND_LDFLAGS+=" -L$ldflag"
+done
+CFLAGS="$PREPEND_CFLAGS $CFLAGS $APPEND_CFLAGS"
+LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"])
+