Initial revision
This commit is contained in:
commit
1243156a5e
87 changed files with 27214 additions and 0 deletions
18
m4/Makefile.am
Normal file
18
m4/Makefile.am
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
##m4-files-begin
|
||||
EXTRA_DIST = README Makefile.am.in malloc.m4 perl.m4 realloc.m4
|
||||
|
||||
##m4-files-end
|
||||
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
chmod a-w $@t
|
||||
mv $@t $@
|
||||
16
m4/Makefile.am.in
Normal file
16
m4/Makefile.am.in
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
##m4-files-begin
|
||||
##m4-files-end
|
||||
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
chmod a-w $@t
|
||||
mv $@t $@
|
||||
8
m4/README
Normal file
8
m4/README
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
These files are used by a program called aclocal (part of the GNU automake
|
||||
package). aclocal uses these files to create aclocal.m4 which is in turn
|
||||
used by autoconf to create the configure script at the the top level in
|
||||
this distribution.
|
||||
|
||||
The Makefile.am file in this directory is automatically generated
|
||||
from the template file, Makefile.am.in. The generation will fail
|
||||
if you don't have all the right tools.
|
||||
44
m4/malloc.m4
Normal file
44
m4/malloc.m4
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#serial 1
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether malloc accepts 0 as its argument.
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_malloc if the replacement function should be used. */
|
||||
dnl #undef malloc
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_MALLOC,
|
||||
[
|
||||
if test x = y; then
|
||||
dnl This code is deliberately never run via ./configure.
|
||||
dnl FIXME: this is a gross hack to make autoheader put an entry
|
||||
dnl for this symbol in config.h.in.
|
||||
AC_CHECK_FUNCS(DONE_WORKING_MALLOC_CHECK)
|
||||
fi
|
||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
||||
ac_kludge=HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
|
||||
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
||||
[AC_TRY_RUN([
|
||||
char *malloc ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
exit (malloc (0) ? 0 : 1);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_malloc=yes,
|
||||
jm_cv_func_working_malloc=no,
|
||||
dnl When crosscompiling, assume malloc is broken.
|
||||
jm_cv_func_working_malloc=no)
|
||||
])
|
||||
if test $jm_cv_func_working_malloc = no; then
|
||||
LIBOBJS="$LIBOBJS malloc.o"
|
||||
AC_DEFINE_UNQUOTED(malloc, rpl_malloc)
|
||||
fi
|
||||
])
|
||||
39
m4/perl.m4
Normal file
39
m4/perl.m4
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#serial 1
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Find a new-enough version of Perl.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_PERL,
|
||||
[
|
||||
dnl FIXME: don't hard-code 5.003
|
||||
dnl FIXME: should we cache the result?
|
||||
AC_MSG_CHECKING([for perl5.003 or newer])
|
||||
if test "${PERL+set}" = set; then
|
||||
# `PERL' is set in the user's environment.
|
||||
candidate_perl_names="$PERL"
|
||||
perl_specified=yes
|
||||
else
|
||||
candidate_perl_names='perl perl5'
|
||||
perl_specified=no
|
||||
fi
|
||||
|
||||
found=no
|
||||
AC_SUBST(PERL)
|
||||
PERL="$missing_dir/missing perl"
|
||||
for perl in $candidate_perl_names; do
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
if ( $perl -e 'require 5.003' ) > /dev/null 2>&1; then
|
||||
PERL=$perl
|
||||
found=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
AC_MSG_RESULT($found)
|
||||
test $found = no && AC_MSG_WARN([
|
||||
*** You don't seem to have perl5.003 or newer installed.
|
||||
*** Because of that, you may be unable to regenerate certain files
|
||||
*** if you modify the sources from which they are derived.] )
|
||||
])
|
||||
44
m4/realloc.m4
Normal file
44
m4/realloc.m4
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#serial 1
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether realloc works when both arguments are 0.
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_realloc if the replacement function should be used. */
|
||||
dnl #undef realloc
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_REALLOC,
|
||||
[
|
||||
if test x = y; then
|
||||
dnl This code is deliberately never run via ./configure.
|
||||
dnl FIXME: this is a gross hack to make autoheader put an entry
|
||||
dnl for this symbol in config.h.in.
|
||||
AC_CHECK_FUNCS(DONE_WORKING_REALLOC_CHECK)
|
||||
fi
|
||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
||||
ac_kludge=HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
|
||||
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
||||
[AC_TRY_RUN([
|
||||
char *realloc ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
exit (realloc (0, 0) ? 0 : 1);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_realloc=yes,
|
||||
jm_cv_func_working_realloc=no,
|
||||
dnl When crosscompiling, assume realloc is broken.
|
||||
jm_cv_func_working_realloc=no)
|
||||
])
|
||||
if test $jm_cv_func_working_realloc = no; then
|
||||
LIBOBJS="$LIBOBJS realloc.o"
|
||||
AC_DEFINE_UNQUOTED(realloc, rpl_realloc)
|
||||
fi
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue