dash/configure.ac
Herbert Xu 95325feb5a [SYSTEM] Added default implementation of bsearch
Added impelmentation of bsearch since klibc doesn't have it yet.
2005-10-29 15:17:47 +10:00

46 lines
1.1 KiB
Plaintext

AC_INIT(dash, 0.5.2)
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_GNU_SOURCE
AC_PROG_YACC
AC_MSG_CHECKING([for build system compiler])
if test "$cross_compiling" = yes; then
CC_FOR_BUILD=${CC_FOR_BUILD-cc}
else
CC_FOR_BUILD=${CC}
fi
AC_MSG_RESULT(${CC_FOR_BUILD})
AC_SUBST(CC_FOR_BUILD)
dnl Checks for libraries.
dnl Checks for header files.
dnl Checks for library functions.
AC_CHECK_FUNCS(bsearch mempcpy sigsetmask stpcpy strchrnul strtoimax strtoumax)
dnl Check for klibc signal.
AC_CHECK_FUNC(signal)
if test "$ac_cv_func_signal" != yes; then
AC_CHECK_FUNC(bsd_signal,
[AC_DEFINE(signal, bsd_signal,
[klibc has bsd_signal instead of signal])])
fi
dnl Check for stat64 (dietlibc/klibc).
AC_CHECK_FUNC(stat64,, [
AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit])
AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit])
])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT