X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=acinclude.m4;h=e50ed926b1ac5df72eb1f0bfd44f5a8ed40d5a0f;hb=201d47019dcd117e5203f0d3ae15fc95b263b2dd;hp=99f0e9f7fef51c2ed91feae6b1893038409d39ab;hpb=0767205183bd541a80b83ce4578e22c9b5fe9fa4;p=gedcom-parse.git diff --git a/acinclude.m4 b/acinclude.m4 index 99f0e9f..e50ed92 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,3 +1,56 @@ +dnl $Id$ +dnl $Name$ + +dnl From codeset.m4 (in libcharset): +#serial 2 + +dnl From Bruno Haible. + +AC_DEFUN(jm_LANGINFO_CODESET, +[ + AC_CHECK_HEADERS(langinfo.h) + AC_CHECK_FUNCS(nl_langinfo) + + AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + jm_cv_langinfo_codeset=yes, + jm_cv_langinfo_codeset=no) + ]) + if test $jm_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) + +dnl From glibc21.m4 (in libcharset): +#serial 2 + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN(jm_GLIBC21, + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) + dnl From iconv.m4: #serial AM2 @@ -11,8 +64,8 @@ AC_DEFUN([AM_ICONV], AC_ARG_WITH([libiconv-prefix], [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ # Addition Peter Verthez - ICONV_PATH=`echo "$withval" | tr : '/dir'` - ICONV_PATH="$ICONV_PATH/dir" + ICONV_PATH=`echo "$withval" | tr : '/bin'` + ICONV_PATH="$ICONV_PATH/bin" AC_SUBST(ICONV_PATH) # end of addition