summaryrefslogtreecommitdiff
path: root/devel/glib12/files/patch-ad
blob: fc31caba3c31f086739da102ed7f98dfadeda765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
--- configure.in.orig	Tue May 11 04:31:37 1999
+++ configure.in	Mon May 17 22:29:31 1999
@@ -48,10 +48,10 @@
 AC_SUBST(GLIB_BINARY_AGE)
 
 # libtool versioning
-LT_RELEASE=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION
-LT_CURRENT=`expr $GLIB_MICRO_VERSION - $GLIB_INTERFACE_AGE`
-LT_REVISION=$GLIB_INTERFACE_AGE
-LT_AGE=`expr $GLIB_BINARY_AGE - $GLIB_INTERFACE_AGE`
+LT_RELEASE=12
+LT_CURRENT=3
+LT_REVISION=0
+LT_AGE=0
 AC_SUBST(LT_RELEASE)
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
@@ -273,7 +273,7 @@
 AC_CHECK_HEADERS(values.h, AC_DEFINE(HAVE_VALUES_H))
 
 # Check for some functions
-AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll)
+AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp)
 
 # Check for sys_errlist
 AC_MSG_CHECKING(for sys_errlist)
@@ -528,6 +528,12 @@
 	  linux*)
 	    G_MODULE_LDFLAGS='-rdynamic'
 	    ;;
+	  freebsd*)
+	    objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+	    if test $objformat = "elf"; then
+		    G_MODULE_LDFLAGS='-Wl,-E'
+	    fi
+	    ;;
 	esac
 	LIBS_orig="$LIBS"
 	LDFLAGS_orig="$LDFLAGS"
@@ -737,11 +743,17 @@
             	        G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads"
 		fi
 		;;
-	*-freebsd2.2*)
-		G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE"
-
-		# FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support
-		# -mthreads flag.
+	*-*-freebsd*)
+		if test x"$G_THREAD_LIBS" = x"-lc_r"; then
+			G_THREAD_CFLAGS="${PTHREAD_CFLAGS}"
+			G_THREAD_LIBS="${PTHREAD_LIBS}"
+			case $host in
+			*-*-freebsd4*) ;;
+			default) have_poll=no ;;
+			esac
+		else
+			G_THREAD_CFLAGS="${PTHREAD_CFLAGS} -DLINUXTHREADS"
+		fi
 		;;
     esac
 
@@ -858,8 +867,6 @@
 AC_SUBST(G_THREAD_CFLAGS)
 AC_SUBST(G_THREAD_LIBS)
 
-CFLAGS="$CFLAGS $G_THREAD_CFLAGS"
-
 dnl **********************************************
 dnl *** GDefaultMutex setup and initialization ***
 dnl **********************************************
@@ -883,6 +890,9 @@
 dnl ****************************************
 dnl *** GLib POLL* compatibility defines ***
 dnl ****************************************
+if test x"$have_poll" != xno; then
+	AC_CHECK_FUNCS(poll)
+fi
 GLIB_SYSDEFS(
 [#include <sys/types.h>
 #include <sys/poll.h>],