--- libogg-1.0/ogg.m4.lib64 2002-07-09 08:54:42.000000000 -0400 +++ libogg-1.0/ogg.m4 2002-07-25 13:45:52.000000000 -0400 @@ -14,12 +14,37 @@ AC_ARG_WITH(ogg-libraries,[ --with-ogg- AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="") AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes) + case $host in + *-*-linux*) + # Test if the compiler is 64bit + echo 'int i;' > conftest.$ac_ext + ogg_cv_cc_64bit_output=no + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *"ELF 64"*) + ogg_cv_cc_64bit_output=yes + ;; + esac + fi + rm -rf conftest* + ;; + esac + + case $host_cpu:$ogg_cv_cc_64bit_output in + powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) + ogg_libname="lib64" + ;; + *:*) + ogg_libname="lib" + ;; + esac + if test "x$ogg_libraries" != "x" ; then OGG_LIBS="-L$ogg_libraries" elif test "x$ogg_prefix" != "x" ; then - OGG_LIBS="-L$ogg_prefix/lib" + OGG_LIBS="-L$ogg_prefix/$ogg_libname" elif test "x$prefix" != "xNONE" ; then - OGG_LIBS="-L$prefix/lib" + OGG_LIBS="-L$prefix/$ogg_libname" fi OGG_LIBS="$OGG_LIBS -logg"