Dmitry V. Levin
916adeda63
* Makefile.am (ACLOCAL_AMFLAGS): Add "-I m4". * acinclude.m4: Remove. * m4/includedir.m4: New file, with definition of AC_INCLUDEDIR from acinclude.m4. * m4/long_long.m4: New file, with definitions of AC_OFF_T_IS_LONG_LONG, AC_RLIM_T_IS_LONG_LONG and AC_LITTLE_ENDIAN_LONG_LONG from acinclude.m4. * m4/procfs.m4: New file, with definitions of AC_MP_PROCFS, AC_POLLABLE_PROCFS and AC_STRUCT_PR_SYSCALL from acinclude.m4. * m4/stat.m4: New file, with definition of AC_STAT64 from acinclude.m4. * m4/statfs.m4: New file, with definition of AC_STATFS64 from acinclude.m4. * m4/warnings.m4: New file, with definition of AC_WARNFLAGS from acinclude.m4.
24 lines
535 B
Plaintext
24 lines
535 B
Plaintext
dnl ### A macro to find the include directory, useful for cross-compiling.
|
|
AC_DEFUN([AC_INCLUDEDIR],
|
|
[AC_REQUIRE([AC_PROG_AWK])dnl
|
|
AC_SUBST(includedir)
|
|
AC_MSG_CHECKING(for primary include directory)
|
|
includedir=/usr/include
|
|
if test -n "$GCC"
|
|
then
|
|
>conftest.c
|
|
new_includedir=`
|
|
$CC -v -E conftest.c 2>&1 | $AWK '
|
|
/^End of search list/ { print last; exit }
|
|
{ last = [$]1 }
|
|
'
|
|
`
|
|
rm -f conftest.c
|
|
if test -n "$new_includedir" && test -d "$new_includedir"
|
|
then
|
|
includedir=$new_includedir
|
|
fi
|
|
fi
|
|
AC_MSG_RESULT($includedir)
|
|
])
|