]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Generate entries for AC_SIZEOF_TYPE automatically.
authorDavid MacKenzie <djm@djmnet.org>
Tue, 19 Apr 1994 18:14:23 +0000 (18:14 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Tue, 19 Apr 1994 18:14:23 +0000 (18:14 +0000)
autoheader.in
autoheader.sh
bin/autoheader.in

index 8db5a70c52dcf3a7b1e8d300c616a589ddfa064e..4114ce3f6c69805dcc4591e0713b8e02ff0ab32b 100644 (file)
@@ -85,6 +85,9 @@ esac
 frob='define([AC_DEFINE],[#
 @@@syms="$syms $1"@@@
 ])dnl
+define([AC_SIZEOF_TYPE],[#
+@@@types="$types,$1"@@@
+])dnl
 define([AC_HAVE_FUNCS],[#
 @@@funcs="$funcs $1"@@@
 ])dnl
@@ -109,11 +112,12 @@ $3
 
 config_h=config.h
 syms=
+types=
 funcs=
 headers=
 libs=
 
-# We extract assignments of SYMS, FUNCS, HEADERS, and LIBS from the
+# We extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
 # modified autoconf processing of the input file.  The sed hair is
 # necessary to win for multi-line macro invocations.
 eval "`echo \"$frob\" \
@@ -168,6 +172,14 @@ if test -n "$syms"; then
    tr @ \\012
 fi
 
+echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
+  test -z "$ctype" && continue
+  sym="`echo "${ctype}" | tr '[a-z *]' '[A-Z_P]'`"
+  echo "
+/* The number of bytes in a ${ctype}.  */
+#undef SIZEOF_${sym}"
+done
+
 for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
   sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
   echo "
index 8db5a70c52dcf3a7b1e8d300c616a589ddfa064e..4114ce3f6c69805dcc4591e0713b8e02ff0ab32b 100644 (file)
@@ -85,6 +85,9 @@ esac
 frob='define([AC_DEFINE],[#
 @@@syms="$syms $1"@@@
 ])dnl
+define([AC_SIZEOF_TYPE],[#
+@@@types="$types,$1"@@@
+])dnl
 define([AC_HAVE_FUNCS],[#
 @@@funcs="$funcs $1"@@@
 ])dnl
@@ -109,11 +112,12 @@ $3
 
 config_h=config.h
 syms=
+types=
 funcs=
 headers=
 libs=
 
-# We extract assignments of SYMS, FUNCS, HEADERS, and LIBS from the
+# We extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
 # modified autoconf processing of the input file.  The sed hair is
 # necessary to win for multi-line macro invocations.
 eval "`echo \"$frob\" \
@@ -168,6 +172,14 @@ if test -n "$syms"; then
    tr @ \\012
 fi
 
+echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
+  test -z "$ctype" && continue
+  sym="`echo "${ctype}" | tr '[a-z *]' '[A-Z_P]'`"
+  echo "
+/* The number of bytes in a ${ctype}.  */
+#undef SIZEOF_${sym}"
+done
+
 for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
   sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
   echo "
index 8db5a70c52dcf3a7b1e8d300c616a589ddfa064e..4114ce3f6c69805dcc4591e0713b8e02ff0ab32b 100644 (file)
@@ -85,6 +85,9 @@ esac
 frob='define([AC_DEFINE],[#
 @@@syms="$syms $1"@@@
 ])dnl
+define([AC_SIZEOF_TYPE],[#
+@@@types="$types,$1"@@@
+])dnl
 define([AC_HAVE_FUNCS],[#
 @@@funcs="$funcs $1"@@@
 ])dnl
@@ -109,11 +112,12 @@ $3
 
 config_h=config.h
 syms=
+types=
 funcs=
 headers=
 libs=
 
-# We extract assignments of SYMS, FUNCS, HEADERS, and LIBS from the
+# We extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
 # modified autoconf processing of the input file.  The sed hair is
 # necessary to win for multi-line macro invocations.
 eval "`echo \"$frob\" \
@@ -168,6 +172,14 @@ if test -n "$syms"; then
    tr @ \\012
 fi
 
+echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
+  test -z "$ctype" && continue
+  sym="`echo "${ctype}" | tr '[a-z *]' '[A-Z_P]'`"
+  echo "
+/* The number of bytes in a ${ctype}.  */
+#undef SIZEOF_${sym}"
+done
+
 for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
   sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
   echo "