[pure-lang-svn] SF.net SVN: pure-lang: [179] pure/trunk
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-06-05 01:09:26
|
Revision: 179 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=179&view=rev Author: agraef Date: 2008-06-04 18:09:34 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Windows compatibility fixes. Modified Paths: -------------- pure/trunk/config.h.in pure/trunk/configure pure/trunk/configure.ac Modified: pure/trunk/config.h.in =================================================================== --- pure/trunk/config.h.in 2008-06-05 00:21:39 UTC (rev 178) +++ pure/trunk/config.h.in 2008-06-05 01:09:34 UTC (rev 179) @@ -12,6 +12,9 @@ /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP +/* Define to 1 if you have the `iconv' library (-liconv). */ +#undef HAVE_LIBICONV + /* Define to 1 if you have the `readline' library (-lreadline). */ #undef HAVE_LIBREADLINE Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-05 00:21:39 UTC (rev 178) +++ pure/trunk/configure 2008-06-05 01:09:34 UTC (rev 179) @@ -1805,8 +1805,8 @@ RDYNAMIC= DLLEXT=".so" case "$host" in - *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS= "-limagehlp -lpsapi"; - DLLEXT=".dll";; + *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS="$LIBS -limagehlp -lpsapi"; + LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";; *-*-linux*) RDYNAMIC="-rdynamic";; *-*-freebsd*) RDYNAMIC="-rdynamic";; *-*-darwin*) DLLEXT=".dylib";; @@ -3351,6 +3351,150 @@ fi +{ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 +echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; } +if test "${ac_cv_lib_iconv_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char iconv (); +int +main () +{ +return iconv (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_iconv_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_iconv_iconv=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6; } +if test $ac_cv_lib_iconv_iconv = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBICONV 1 +_ACEOF + + LIBS="-liconv $LIBS" + +fi + +if test $ac_cv_lib_iconv_iconv = no; then + +{ echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 +echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6; } +if test "${ac_cv_lib_iconv_libiconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char libiconv (); +int +main () +{ +return libiconv (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_iconv_libiconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_iconv_libiconv=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_libiconv" >&6; } +if test $ac_cv_lib_iconv_libiconv = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBICONV 1 +_ACEOF + + LIBS="-liconv $LIBS" + +fi + +fi + { echo "$as_me:$LINENO: checking for glob in -lglob" >&5 echo $ECHO_N "checking for glob in -lglob... $ECHO_C" >&6; } if test "${ac_cv_lib_glob_glob+set}" = set; then @@ -3421,7 +3565,80 @@ fi +if test $ac_cv_lib_glob_glob = no; then +{ echo "$as_me:$LINENO: checking for xxglob in -lglob" >&5 +echo $ECHO_N "checking for xxglob in -lglob... $ECHO_C" >&6; } +if test "${ac_cv_lib_glob_xxglob+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lglob $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xxglob (); +int +main () +{ +return xxglob (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_glob_xxglob=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_glob_xxglob=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_glob_xxglob" >&5 +echo "${ECHO_T}$ac_cv_lib_glob_xxglob" >&6; } +if test $ac_cv_lib_glob_xxglob = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGLOB 1 +_ACEOF + + LIBS="-lglob $LIBS" + +fi + +fi + { echo "$as_me:$LINENO: checking for regcomp in -lregex" >&5 echo $ECHO_N "checking for regcomp in -lregex... $ECHO_C" >&6; } if test "${ac_cv_lib_regex_regcomp+set}" = set; then @@ -3492,8 +3709,81 @@ fi +if test $ac_cv_lib_regex_regcomp = no; then +{ echo "$as_me:$LINENO: checking for xxregcomp in -lregex" >&5 +echo $ECHO_N "checking for xxregcomp in -lregex... $ECHO_C" >&6; } +if test "${ac_cv_lib_regex_xxregcomp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lregex $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xxregcomp (); +int +main () +{ +return xxregcomp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_regex_xxregcomp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_regex_xxregcomp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_regex_xxregcomp" >&5 +echo "${ECHO_T}$ac_cv_lib_regex_xxregcomp" >&6; } +if test $ac_cv_lib_regex_xxregcomp = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBREGEX 1 +_ACEOF + + LIBS="-lregex $LIBS" + +fi + +fi + + am_cv_lib_iconv_ldpath= # Check whether --with-libiconv-prefix was given. Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-05 00:21:39 UTC (rev 178) +++ pure/trunk/configure.ac 2008-06-05 01:09:34 UTC (rev 179) @@ -12,8 +12,8 @@ RDYNAMIC= DLLEXT=".so" case "$host" in - *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS= "-limagehlp -lpsapi"; - DLLEXT=".dll";; + *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS="$LIBS -limagehlp -lpsapi"; + LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";; *-*-linux*) RDYNAMIC="-rdynamic";; *-*-freebsd*) RDYNAMIC="-rdynamic";; *-*-darwin*) DLLEXT=".dylib";; @@ -50,9 +50,19 @@ dnl Check for libraries. AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) -dnl On some systems these are in separate libraries. +dnl On some systems these are in separate libraries, and may have other names. +AC_CHECK_LIB(iconv, iconv) +if test $ac_cv_lib_iconv_iconv = no; then + AC_CHECK_LIB(iconv, libiconv) +fi AC_CHECK_LIB(glob, glob) +if test $ac_cv_lib_glob_glob = no; then + AC_CHECK_LIB(glob, xxglob) +fi AC_CHECK_LIB(regex, regcomp) +if test $ac_cv_lib_regex_regcomp = no; then + AC_CHECK_LIB(regex, xxregcomp) +fi dnl iconv and nl_langinfo need special treatment (macros by Bruno Haible). AM_ICONV AM_LANGINFO_CODESET This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |