[project @ 2005-02-10 04:58:09 by wolfgang]
authorwolfgang <unknown>
Thu, 10 Feb 2005 04:58:09 +0000 (04:58 +0000)
committerwolfgang <unknown>
Thu, 10 Feb 2005 04:58:09 +0000 (04:58 +0000)
Add a special case for Mac OS X to FP_PROG_AR_NEEDS_RANLIB.
On Mac OS X, we need to run ranlib after installing .a files because
they contain a timestamp which will be outdated after installing.

We could do a proper test for that, but it would contain the command
'sleep 6' and still apply only to one platform.

aclocal.m4

index a746bc5..c5fd692 100644 (file)
@@ -484,9 +484,14 @@ AC_SUBST([ArCmd], ["$fp_prog_ar $fp_prog_ar_args"])
 AC_DEFUN([FP_PROG_AR_NEEDS_RANLIB],
 [AC_REQUIRE([FP_PROG_AR_IS_GNU])
 AC_REQUIRE([FP_PROG_AR_ARGS])
+AC_REQUIRE([AC_PROG_CC])
 AC_CACHE_CHECK([whether ranlib is needed], [fp_cv_prog_ar_needs_ranlib],
 [if test $fp_prog_ar_is_gnu = yes; then
   fp_cv_prog_ar_needs_ranlib=no
+elif test $TargetPlatform = powerpc-apple-darwin; then
+  # It's quite tedious to check for Apple's crazy timestamps in .a files,
+  # so we hardcode it.
+  fp_cv_prog_ar_needs_ranlib=yes
 elif echo $fp_prog_ar_args | grep "s" > /dev/null 2> /dev/null; then
   fp_cv_prog_ar_needs_ranlib=no
 else