]> arthur.barton.de Git - netatalk.git/blobdiff - macros/util.m4
- merge branch-netatalk-afp-3x-dev, HEAD was tagged before
[netatalk.git] / macros / util.m4
diff --git a/macros/util.m4 b/macros/util.m4
new file mode 100644 (file)
index 0000000..aea9d55
--- /dev/null
@@ -0,0 +1,24 @@
+dnl Removes -I/usr/include/? from given variable
+AC_DEFUN([CFLAGS_REMOVE_USR_INCLUDE],[
+  ac_new_flags=""
+  for i in [$]$1; do
+    case [$]i in
+    -I/usr/include|-I/usr/include/) ;;
+    *) ac_new_flags="[$]ac_new_flags [$]i" ;;
+    esac
+  done
+  $1=[$]ac_new_flags
+])
+
+dnl Removes -L/usr/lib/? from given variable
+AC_DEFUN([LIB_REMOVE_USR_LIB],[
+  ac_new_flags=""
+  for i in [$]$1; do
+    case [$]i in
+    -L/usr/lib|-L/usr/lib/|-L/usr|-L/usr/) ;;
+    *) ac_new_flags="[$]ac_new_flags [$]i" ;;
+    esac
+  done
+  $1=[$]ac_new_flags
+])
+