Ticket #4182: patch-configure.in

File patch-configure.in, 3.1 KB (added by mwdiers@…, 19 years ago)

Updated configure.in patch

Line 
1--- configure.in.orig   2005-07-28 12:46:05.000000000 -0500
2+++ configure.in        2005-07-28 12:46:14.000000000 -0500
3@@ -159,7 +159,7 @@
4   # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
5   # this is fixed in 10.3, which identifies itself as Darwin/7.*
6   # This should hopefully be fixed in FreeBSD 4.9
7-  FreeBSD/4.8* | Darwin/6* )
8+  FreeBSD/4.8* | Darwin/6* | Darwin/8*)
9     define_xopen_source=no;;
10   # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
11   # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
12@@ -554,6 +554,13 @@
13          BLDLIBRARY='-L. -lpython$(VERSION)'
14          RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
15          ;;
16+    Darwin*)
17+         if test -z "$enable_framework"; then
18+           LDLIBRARY='libpython$(VERSION).dylib'
19+           BLDLIBRARY='-L. -lpython$(VERSION)'
20+           RUNSHARED=DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}
21+         fi
22+         ;;
23   esac
24   # DG/UX requires some fancy ld contortions to produce a .so from an .a
25   case $MACHDEP in
26@@ -687,7 +694,12 @@
27            ;;
28        # is there any other compiler on Darwin besides gcc?
29        Darwin*)
30-           BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
31+               if [[ `/usr/bin/arch` = 'ppc' ]]
32+               then
33+                       BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common"
34+               else
35+                       BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -fno-common"
36+               fi
37            ;;
38     esac
39     ;;
40@@ -1293,8 +1305,8 @@
41                        LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
42                else
43                        # No framework, use the Python app as bundle-loader
44-                       BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
45-                       LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
46+                       BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
47+                       LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
48                fi ;;
49        Darwin/*)
50                # Use -undefined dynamic_lookup whenever possible (10.3 and later).
51@@ -1740,7 +1752,7 @@
52   SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
53                        Defined for Solaris 2.6 bug in pthread header.)
54                       ;;
55-      SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
56+      SunOS/5.8 | Darwin/8*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
57                       Define if the Posix semaphores do not work on your system)
58                       ;;
59       esac
60@@ -2274,13 +2286,23 @@
61    [Define if getpgrp() must be called as getpgrp(0).])
62  )
63 )
64-AC_CHECK_FUNCS(setpgrp,
65-  AC_TRY_COMPILE([#include <unistd.h>],
66-    [setpgrp(0,0);],
67+
68+case $ac_sys_system/$ac_sys_release in
69+Darwin/8*)
70     AC_DEFINE(SETPGRP_HAVE_ARG, 1,
71     [Define if setpgrp() must be called as setpgrp(0, 0).])
72-  )
73-)
74+    ;;
75+*)
76+    AC_CHECK_FUNCS(setpgrp,
77+      AC_TRY_COMPILE([#include <unistd.h>],
78+        [setpgrp(0,0);],
79+        AC_DEFINE(SETPGRP_HAVE_ARG, 1,
80+        [Define if setpgrp() must be called as setpgrp(0, 0).])
81+      )
82+    )
83+    ;;
84+esac
85+
86 AC_CHECK_FUNCS(gettimeofday,
87   AC_TRY_COMPILE([#include <sys/time.h>],
88     [gettimeofday((struct timeval*)0,(struct timezone*)0);], ,