aboutsummaryrefslogtreecommitdiff
path: root/m4/japhar_grep_cflags.m4
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2008-08-01 21:44:16 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2008-08-01 21:44:16 +0000
commit6a8ea6aec1bf80a0c2e67768aa324d64191bad39 (patch)
tree6d8ecd86541c90004320c7d111eb15f4645ce05b /m4/japhar_grep_cflags.m4
parent68eb48b63d297db91cf371373e4187fda4830280 (diff)
downloadpam-6a8ea6aec1bf80a0c2e67768aa324d64191bad39.tar.gz
pam-6a8ea6aec1bf80a0c2e67768aa324d64191bad39.tar.bz2
pam-6a8ea6aec1bf80a0c2e67768aa324d64191bad39.zip
Relevant BUGIDs:
Purpose of commit: cleanup Commit summary: --------------- 2008-08-01 Thorsten Kukuk <kukuk@thkukuk.de> * acincludde.m4: Rename to ... * m4/jh_path_xml_catalog.m4: ... this. * m4/*.m4: Remove all autoconf m4 files. Remove old autoconf m4 files from CVS, autogen.sh will now copy current versions from the system. (Avoid having old buggy versions forever).
Diffstat (limited to 'm4/japhar_grep_cflags.m4')
-rw-r--r--m4/japhar_grep_cflags.m448
1 files changed, 48 insertions, 0 deletions
diff --git a/m4/japhar_grep_cflags.m4 b/m4/japhar_grep_cflags.m4
new file mode 100644
index 00000000..5318a140
--- /dev/null
+++ b/m4/japhar_grep_cflags.m4
@@ -0,0 +1,48 @@
+dnl
+dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
+dnl
+dnl From Japhar. Report changes to japhar@hungry.com
+dnl
+AC_DEFUN([JAPHAR_GREP_CFLAGS],
+[case "$CFLAGS" in
+"$1" | "$1 "* | *" $1" | *" $1 "* )
+ ifelse($#, 3, [$3], [:])
+ ;;
+*)
+ $2
+ ;;
+esac
+])
+
+dnl
+dnl Test for __attribute__ ((unused))
+dnl Based on code from the tcpdump version 3.7.2 source.
+dnl
+
+AC_DEFUN([AC_C___ATTRIBUTE__], [
+AC_MSG_CHECKING(for __attribute__)
+AC_CACHE_VAL(ac_cv___attribute__, [
+AC_TRY_COMPILE([
+#include <stdlib.h>
+static void foo (void) __attribute__ ((unused));
+
+static void
+foo (void)
+{
+ exit(1);
+}
+],
+[
+ exit (0);
+],
+ac_cv___attribute__=yes,
+ac_cv___attribute__=no)])
+if test "$ac_cv___attribute__" = "yes"; then
+ AC_DEFINE(UNUSED, __attribute__ ((unused)), [define if your compiler has __att
+ribute__ ((unused))])
+else
+ AC_DEFINE(UNUSED,,)
+fi
+AC_MSG_RESULT($ac_cv___attribute__)
+])
+