openjdk-23: use OpenJDK 23 as the boot JDK
[oi-userland.git] / components / library / gamin / patches / 04-configure.patch
blob222d307d0e4c6fba952391cc6de70b142726652e
1 --- gamin-0.1.10/configure.in.orig 2008-11-24 16:23:06.000000000 +0000
2 +++ gamin-0.1.10/configure.in 2023-01-25 21:22:37.375364226 +0000
3 @@ -42,6 +42,12 @@
4 CFLAGS=""
5 fi
7 +dnl If the user set no CFLAGS, then don't assume the autotools defaults of
8 +dnl "-g -O2". We set default CFLAGS later based on the --disable-debug flag.
9 +if test -z "$ENV_CFLAGS"; then
10 + CFLAGS=""
11 +fi
13 dnl for the spec file
14 RELDATE=`date +'%a %b %e %Y'`
15 AC_SUBST(RELDATE)
16 @@ -279,6 +285,43 @@
17 backends="${backends}, kqueue"
20 +case "$os" in
21 + solaris*)
22 + AM_CONDITIONAL(ON_SOLARIS, true)
23 + AC_COMPILE_IFELSE([
24 + #include <port.h>
25 + #ifndef PORT_SOURCE_FILE
26 + #error "Please upgrade to Nevada 72 or above to suppoert FEN"
27 + #endif
28 + int main() { return 0; }
29 + ],[have_fen=1],)
30 + if test x$have_fen = x1 ; then
31 + AC_ARG_ENABLE(fen,
32 + AC_HELP_STRING([--disable-fen], [Disable the FEN backend]),
33 + [fen="${enableval}"], [fen=true])
35 + if test x$fen = xyes; then
36 + fen=true
37 + elif test x$fen = xno; then
38 + fen=false
39 + elif test x$fen != xtrue; then
40 + AC_MSG_ERROR(bad value ${enableval} for --disable-fen)
41 + fi
42 + fi
43 + break;
44 + ;;
45 + *)
46 + fen=false
47 + break;
48 + ;;
49 +esac
51 +AM_CONDITIONAL(ENABLE_FEN, test x$fen = xtrue)
52 +if test x$fen = xtrue; then
53 + AC_DEFINE(ENABLE_FEN,1,[Use Solaris FEN as backend])
54 + backends="${backends}, FEN"
55 +fi
57 dnl pthread support for reentrance of the client library.
58 AC_ARG_WITH(threads,
59 [ --with-threads add multithread support(on)])
60 @@ -385,6 +428,14 @@
61 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
64 +dnl Check for getpeerucred support - Solaris
66 +AC_CHECK_HEADER(ucred.h,
67 + AC_CHECK_LIB(c, getpeerucred,[
68 + AC_DEFINE([HAVE_GETPEERUCRED],[],[Define if has getpeerucred])
69 + AC_DEFINE([HAVE_UCRED_H],[],[Define if <ucred.h> exists])]))
72 #### Abstract sockets
74 AC_MSG_CHECKING(abstract socket namespace)
75 @@ -455,7 +506,6 @@
76 PYTHON_INCLUDES=
77 PYTHON_SITE_PACKAGES=
78 PYTHON_TESTS=
79 -pythondir=
80 if test "$with_python" != "no" ; then
81 if test -x "$with_python/bin/python"
82 then
83 @@ -478,26 +528,26 @@
85 if test "$PYTHON" != ""
86 then
87 - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
88 + PYTHON_VERSION=`$PYTHON -c "import sys; print(sys.version)" | awk -F\. 'NR==1 {print $1 "." $2}'`
89 echo Found Python version $PYTHON_VERSION
91 if test "$PYTHON_VERSION" != ""
92 then
93 if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
94 - -d $with_python/lib/python$PYTHON_VERSION/site-packages
95 + -d $with_python/lib/python$PYTHON_VERSION/vendor-packages
96 then
97 PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
98 - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
99 + PYTHON_SITE_PACKAGES=/usr/lib/python$PYTHON_VERSION/vendor-packages
100 else
101 if test -r $prefix/include/python$PYTHON_VERSION/Python.h
102 then
103 PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
104 - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
105 + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/vendor-packages
106 else
107 if test -r /usr/include/python$PYTHON_VERSION/Python.h
108 then
109 PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
110 - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
111 + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/vendor-packages
112 else
113 echo could not find python$PYTHON_VERSION/Python.h
115 @@ -508,11 +558,13 @@
119 - if test "$with_python" != ""
120 - then
121 - pythondir='$(PYTHON_SITE_PACKAGES)'
122 - else
123 - pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
124 + if test -z "$pythondir"; then
125 + if test "$with_python" != ""
126 + then
127 + pythondir='$(PYTHON_SITE_PACKAGES)'
128 + else
129 + pythondir='$(libdir)/python$(PYTHON_VERSION)/vendor-packages'
130 + fi
132 else
133 PYTHON=
134 @@ -529,6 +581,16 @@
135 AC_SUBST(PYTHON_INCLUDES)
136 AC_SUBST(PYTHON_SITE_PACKAGES)
138 +dnl Check for -lsocket -lnsl
140 +AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
141 +AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
143 +dnl Check for <sys/mnttab.h>
145 +AC_CHECK_HEADER(sys/mnttab.h,
146 + AC_DEFINE([HAVE_SYS_MNTTAB_H], [], [Define if <sys/mnttab.h> is there]))
148 dnl After all config-related tweaking of CFLAGS, set it to its "build" value
150 AC_MSG_CHECKING(for more compiler warnings)