diff options
author | Jim Meyering <jim@meyering.net> | 2005-03-17 19:01:15 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-03-17 19:01:15 +0000 |
commit | 9b9bda0ccf1aefad024633bc09f44257dafe9f50 (patch) | |
tree | 383e62aaaba7c233fb3cdd86ba69772d68e40bde | |
parent | 4ef7ce47dc621209b97bc6074844ea7d290f8286 (diff) | |
download | coreutils-9b9bda0ccf1aefad024633bc09f44257dafe9f50.tar.xz |
(gl_TYPEOF): New file/macro.
-rw-r--r-- | m4/typeof.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/m4/typeof.m4 b/m4/typeof.m4 new file mode 100644 index 000000000..42cdd3723 --- /dev/null +++ b/m4/typeof.m4 @@ -0,0 +1,23 @@ +#serial 1 +dnl Copyright (C) 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Jim Meyering. + +AC_DEFUN([gl_TYPEOF], +[AC_CACHE_CHECK([for __typeof__], gl_cv_typeof, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [[ + int i; + __typeof__ i j; + ]])], + [gl_cv_typeof=yes], + [gl_cv_typeof=no]) + ]) + if test $gl_cv_typeof = no; then + AC_DEFINE(HAVE_TYPEOF, 1, + [Define to 1 if __typeof__ works with your compiler.]) + fi +]) |