# HG changeset patch # User Matti Hamalainen # Date 1353282449 -7200 # Node ID 6820177eb6da4d7e1ecec18a38bb5fcb6f136c0c # Parent 7c62e686b6a4e626917b07158ee3ec29dad3b4d7 Properly check for things like off_t and size_t and few libc functions, just to be safe. diff -r 7c62e686b6a4 -r 6820177eb6da acinclude.m4 --- a/acinclude.m4 Sun Nov 18 18:09:19 2012 +0200 +++ b/acinclude.m4 Mon Nov 19 01:47:29 2012 +0200 @@ -4,6 +4,13 @@ dnl *** Updated for new autotools, plus namespace, added portability dnl *** fixes and other minor changes by Matti 'ccr' Hamalainen dnl *** (C) Copyright 2003-2008 Tecnic Software productions (TNSP) +AC_DEFUN([XS_CHECK_FEATURE], +[ + if test "x[]$$1" != "xyes"; then + AC_MSG_ERROR([Required feature $2 not detected. See config.log for more information.]) + fi +]) + AC_DEFUN([XS_FIND_FILE], [ diff -r 7c62e686b6a4 -r 6820177eb6da configure.ac --- a/configure.ac Sun Nov 18 18:09:19 2012 +0200 +++ b/configure.ac Mon Nov 19 01:47:29 2012 +0200 @@ -59,12 +59,18 @@ dnl *** Checks for header files, types and functions dnl *** AC_HEADER_STDC +AC_C_INLINE +AC_C_CONST AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) +AC_TYPE_OFF_T AC_TYPE_SIZE_T -AC_C_CONST -AC_C_INLINE -AC_CHECK_FUNCS([memset],[],[[*** memset function not found. Your libc has failed you.]]) +AC_FUNC_FSEEKO +dnl XS_CHECK_FEATURE([ac_cv_sys_largefile_source], [fseeko/ftello]) +AC_CHECK_FUNCS([memset]) +XS_CHECK_FEATURE([ac_cv_func_memset], [memset]) +AC_CHECK_FUNCS([bsearch]) +XS_CHECK_FEATURE([ac_cv_func_bsearch], [bsearch]) dnl *** diff -r 7c62e686b6a4 -r 6820177eb6da src/config.h.in --- a/src/config.h.in Sun Nov 18 18:09:19 2012 +0200 +++ b/src/config.h.in Mon Nov 19 01:47:29 2012 +0200 @@ -22,6 +22,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO + /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT @@ -37,9 +40,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - /* Define if you have reSID for libSIDPlay 2 */ #undef HAVE_RESID_BUILDER @@ -125,6 +125,9 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES @@ -137,5 +140,8 @@ #undef inline #endif +/* Define to `long int' if does not define. */ +#undef off_t + /* Define to `unsigned int' if does not define. */ #undef size_t