mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-18 10:45:15 +08:00
Generate entries for AC_SIZEOF_TYPE automatically.
This commit is contained in:
parent
153fcc5a8b
commit
dc7cdb7420
@ -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 "
|
||||
|
@ -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 "
|
||||
|
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user