OSSP CVS Repository

ossp - Check-in [372]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 372
Date: 2001-Jan-29 21:23:47 (local)
2001-Jan-29 20:23:47 (UTC)
User:rse
Branch:
Comment: *** empty log message ***
Tickets:
Inspections:
Files:
ossp-pkg/mm/ChangeLog      1.22 -> 1.23     5 inserted, 0 deleted
ossp-pkg/mm/aclocal.m4      1.20 -> 1.21     23 inserted, 12 deleted
ossp-pkg/mm/configure      1.34 -> 1.35     96 inserted, 75 deleted
ossp-pkg/mm/configure.in      added-> 1.18

ossp-pkg/mm/ChangeLog 1.22 -> 1.23

--- ChangeLog    2001/01/29 20:04:54     1.22
+++ ChangeLog    2001/01/29 20:23:47     1.23
@@ -16,6 +16,11 @@
 
  Changes between 1.1.3 and 1.1.4 (01-Jul-2000 to xx-Jan-2001)
 
+  *) From Apache 2.0's MM patch set:
+     Make Autoconf test for maximum shared memory size support BEOS and
+     make decision cacheable.
+     [The Apache Software Foundation]
+
   *) Fixed initializations of fdxxx variables in mm_core.c
      [Alexander Farber <farber@cpan.org>]
 


ossp-pkg/mm/aclocal.m4 1.20 -> 1.21

--- aclocal.m4   2000/10/31 07:06:54     1.20
+++ aclocal.m4   2001/01/29 20:23:47     1.21
@@ -242,6 +242,7 @@
 
 define(AC_CHECK_MAXSEGSIZE,[dnl
 AC_MSG_CHECKING(for shared memory maximum segment size)
+AC_CACHE_VAL(ac_cv_maxsegsize,[
 OCFLAGS="$CFLAGS"
 case "$1" in
     MM_SHMT_MM*    ) CFLAGS="-DTEST_MMAP   $CFLAGS" ;;
@@ -286,6 +287,9 @@
 #if !defined(MAP_FAILED)
 #define MAP_FAILED ((void *)-1)
 #endif
+#ifdef MM_OS_BEOS
+#include <kernel/OS.h>
+#endif
 
 int testit(int size)
 {
@@ -317,6 +321,14 @@
     shmdt(segment);
     shmctl(fd, IPC_RMID, NULL);
 #endif
+#ifdef TEST_BEOS
+    area_id id;
+    id = create_area("mm_test", (void*)&segment, B_ANY_ADDRESS, size, 
+                     B_LAZY_LOCK, B_READ_AREA|B_WRITE_AREA);
+    if (id < 0)
+        return 0;
+    delete_area(id);
+#endif
     return 1;
 }
 
@@ -371,9 +383,15 @@
 }
 >>
 changequote([, ])dnl
-,[
-MM_SHM_MAXSEGSIZE="`cat conftestval`"
-msg="$MM_SHM_MAXSEGSIZE"
+,[ac_cv_maxsegsize="`cat conftestval`"
+],
+ac_cv_maxsegsize=0
+,
+ac_cv_maxsegsize=0
+)
+CFLAGS="$OCFLAGS"
+])
+msg="$ac_cv_maxsegsize"
 if test $msg -eq 67108864; then
     msg="64MB (soft limit)"
 elif test $msg -gt 1048576; then
@@ -384,17 +402,10 @@
     msg="`expr $msg / 1024`"
     msg="${msg}KB"
 else
-    MM_SHM_MAXSEGSIZE=0
+    ac_cv_maxsegsize=0
     msg=unknown
 fi
-],
-MM_SHM_MAXSEGSIZE=0
-msg=unknown
-,
-MM_SHM_MAXSEGSIZE=0
-msg=unknown
-)dnl
-CFLAGS="$OCFLAGS"
+MM_SHM_MAXSEGSIZE=$ac_cv_maxsegsize
 test ".$msg" = .unknown && AC_MSG_ERROR([Unable to determine maximum shared memory segment size])
 AC_MSG_RESULT([$msg])
 AC_DEFINE_UNQUOTED(MM_SHM_MAXSEGSIZE, $MM_SHM_MAXSEGSIZE)


ossp-pkg/mm/configure 1.34 -> 1.35

--- configure    2000/10/31 07:06:54     1.34
+++ configure    2001/01/29 20:23:47     1.35
@@ -1389,6 +1389,10 @@
 #define MM_OS_BS2000 1
 EOF
  ;;
+   *-*-beos*  ) cat >> confdefs.h <<\EOF
+#define MM_OS_BEOS 1
+EOF
+   ;;
 esac
 
 
@@ -1400,17 +1404,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1404: checking for $ac_hdr" >&5
+echo "configure:1408: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1409 "configure"
+#line 1413 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1439,12 +1443,12 @@
 for ac_func in getpagesize sysconf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1443: checking for $ac_func" >&5
+echo "configure:1447: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1448 "configure"
+#line 1452 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1467,7 +1471,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1492,12 +1496,12 @@
 done
 
   echo $ac_n "checking for _SC_PAGESIZE in unistd.h""... $ac_c" 1>&6
-echo "configure:1496: checking for _SC_PAGESIZE in unistd.h" >&5
+echo "configure:1500: checking for _SC_PAGESIZE in unistd.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define__SC_PAGESIZE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1501 "configure"
+#line 1505 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -1528,12 +1532,12 @@
   fi
 
   echo $ac_n "checking for B_PAGE_SIZE in kernel/OS.h""... $ac_c" 1>&6
-echo "configure:1532: checking for B_PAGE_SIZE in kernel/OS.h" >&5
+echo "configure:1536: checking for B_PAGE_SIZE in kernel/OS.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define_B_PAGE_SIZE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1537 "configure"
+#line 1541 "configure"
 #include "confdefs.h"
 
 #include <kernel/OS.h>
@@ -1697,17 +1701,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1701: checking for $ac_hdr" >&5
+echo "configure:1705: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1706 "configure"
+#line 1710 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1734,12 +1738,12 @@
 done
 
   echo $ac_n "checking for MAP_ANON in sys/mman.h""... $ac_c" 1>&6
-echo "configure:1738: checking for MAP_ANON in sys/mman.h" >&5
+echo "configure:1742: checking for MAP_ANON in sys/mman.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define_MAP_ANON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1743 "configure"
+#line 1747 "configure"
 #include "confdefs.h"
 
 #include <sys/mman.h>
@@ -1772,12 +1776,12 @@
 for ac_func in mmap munmap shm_open shm_unlink
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1776: checking for $ac_func" >&5
+echo "configure:1780: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1781 "configure"
+#line 1785 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1800,7 +1804,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1827,7 +1831,7 @@
 
 ac_safe=`echo "/dev/zero" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6
-echo "configure:1831: checking for /dev/zero" >&5
+echo "configure:1835: checking for /dev/zero" >&5
 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1851,17 +1855,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1855: checking for $ac_hdr" >&5
+echo "configure:1859: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1860 "configure"
+#line 1864 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1890,12 +1894,12 @@
 for ac_func in shmget shmat shmdt shmctl
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1894: checking for $ac_func" >&5
+echo "configure:1898: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1899 "configure"
+#line 1903 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1918,7 +1922,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1946,17 +1950,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1950: checking for $ac_hdr" >&5
+echo "configure:1954: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1955 "configure"
+#line 1959 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1985,12 +1989,12 @@
 for ac_func in create_area
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1989: checking for $ac_func" >&5
+echo "configure:1993: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1994 "configure"
+#line 1998 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2013,7 +2017,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2335,7 +2339,11 @@
 
 
 echo $ac_n "checking for shared memory maximum segment size""... $ac_c" 1>&6
-echo "configure:2339: checking for shared memory maximum segment size" >&5
+echo "configure:2343: checking for shared memory maximum segment size" >&5
+if eval "test \"`echo '$''{'ac_cv_maxsegsize'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
 OCFLAGS="$CFLAGS"
 case "$ac_decision" in
     MM_SHMT_MM*    ) CFLAGS="-DTEST_MMAP   $CFLAGS" ;;
@@ -2343,12 +2351,11 @@
 esac
 cross_compile=no
 if test "$cross_compiling" = yes; then
-  MM_SHM_MAXSEGSIZE=0
-msg=unknown
+  ac_cv_maxsegsize=0
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 2352 "configure"
+#line 2359 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -2386,6 +2393,9 @@
 #if !defined(MAP_FAILED)
 #define MAP_FAILED ((void *)-1)
 #endif
+#ifdef MM_OS_BEOS
+#include <kernel/OS.h>
+#endif
 
 int testit(int size)
 {
@@ -2417,6 +2427,14 @@
     shmdt(segment);
     shmctl(fd, IPC_RMID, NULL);
 #endif
+#ifdef TEST_BEOS
+    area_id id;
+    id = create_area("mm_test", (void*)&segment, B_ANY_ADDRESS, size, 
+                     B_LAZY_LOCK, B_READ_AREA|B_WRITE_AREA);
+    if (id < 0)
+        return 0;
+    delete_area(id);
+#endif
     return 1;
 }
 
@@ -2472,11 +2490,25 @@
 
 
 EOF
-if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  
-MM_SHM_MAXSEGSIZE="`cat conftestval`"
-msg="$MM_SHM_MAXSEGSIZE"
+  ac_cv_maxsegsize="`cat conftestval`"
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_maxsegsize=0
+
+fi
+rm -fr conftest*
+fi
+
+CFLAGS="$OCFLAGS"
+
+fi
+
+msg="$ac_cv_maxsegsize"
 if test $msg -eq 67108864; then
     msg="64MB (soft limit)"
 elif test $msg -gt 1048576; then
@@ -2487,21 +2519,10 @@
     msg="`expr $msg / 1024`"
     msg="${msg}KB"
 else
-    MM_SHM_MAXSEGSIZE=0
+    ac_cv_maxsegsize=0
     msg=unknown
 fi
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  MM_SHM_MAXSEGSIZE=0
-msg=unknown
-
-fi
-rm -fr conftest*
-fi
-CFLAGS="$OCFLAGS"
+MM_SHM_MAXSEGSIZE=$ac_cv_maxsegsize
 test ".$msg" = .unknown && { echo "configure: error: Unable to determine maximum shared memory segment size" 1>&2; exit 1; }
 echo "$ac_t""$msg" 1>&6
 cat >> confdefs.h <<EOF
@@ -2519,17 +2540,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2523: checking for $ac_hdr" >&5
+echo "configure:2544: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2528 "configure"
+#line 2549 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2558,12 +2579,12 @@
 for ac_func in semget semctl
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2562: checking for $ac_func" >&5
+echo "configure:2583: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2567 "configure"
+#line 2588 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2586,7 +2607,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2611,12 +2632,12 @@
 done
 
   echo $ac_n "checking for LOCK_EX in sys/file.h""... $ac_c" 1>&6
-echo "configure:2615: checking for LOCK_EX in sys/file.h" >&5
+echo "configure:2636: checking for LOCK_EX in sys/file.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define_LOCK_EX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2620 "configure"
+#line 2641 "configure"
 #include "confdefs.h"
 
 #include <sys/file.h>
@@ -2647,12 +2668,12 @@
   fi
 
   echo $ac_n "checking for F_SETLK in fcntl.h""... $ac_c" 1>&6
-echo "configure:2651: checking for F_SETLK in fcntl.h" >&5
+echo "configure:2672: checking for F_SETLK in fcntl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define_F_SETLK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2656 "configure"
+#line 2677 "configure"
 #include "confdefs.h"
 
 #include <fcntl.h>
@@ -2683,12 +2704,12 @@
   fi
 
   echo $ac_n "checking for IPC_PRIVATE in sys/ipc.h""... $ac_c" 1>&6
-echo "configure:2687: checking for IPC_PRIVATE in sys/ipc.h" >&5
+echo "configure:2708: checking for IPC_PRIVATE in sys/ipc.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define_IPC_PRIVATE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2692 "configure"
+#line 2713 "configure"
 #include "confdefs.h"
 
 #include <sys/ipc.h>
@@ -2719,12 +2740,12 @@
   fi
 
   echo $ac_n "checking for SEM_UNDO in sys/sem.h""... $ac_c" 1>&6
-echo "configure:2723: checking for SEM_UNDO in sys/sem.h" >&5
+echo "configure:2744: checking for SEM_UNDO in sys/sem.h" >&5
 if eval "test \"`echo '$''{'ac_cv_define_SEM_UNDO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2728 "configure"
+#line 2749 "configure"
 #include "confdefs.h"
 
 #include <sys/sem.h>
@@ -2758,17 +2779,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2762: checking for $ac_hdr" >&5
+echo "configure:2783: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2767 "configure"
+#line 2788 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2797,12 +2818,12 @@
 for ac_func in create_sem
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2801: checking for $ac_func" >&5
+echo "configure:2822: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2806 "configure"
+#line 2827 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2825,7 +2846,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2851,9 +2872,9 @@
 
 
 echo $ac_n "checking whether union semun is defined in sys/sem.h""... $ac_c" 1>&6
-echo "configure:2855: checking whether union semun is defined in sys/sem.h" >&5
+echo "configure:2876: checking whether union semun is defined in sys/sem.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2857 "configure"
+#line 2878 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2867,7 +2888,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define HAVE_UNION_SEMUN 1


ossp-pkg/mm/configure.in -> 1.18

*** /dev/null    Fri May  3 16:07:30 2024
--- -    Fri May  3 16:07:54 2024
***************
*** 0 ****
--- 1,254 ----
+ dnl ##
+ dnl ##   Autoconf specification for MM library
+ dnl ##
+ 
+ dnl #
+ dnl #   standard Autoconf prolog
+ dnl #
+ 
+ AC_PREREQ(2.12)dnl
+ AC_REVISION($1.0$)dnl
+ 
+ dnl #   shtool bootstrap
+ SHTOOL="\$(TOP)/shtool"
+ AC_SUBST(SHTOOL)
+ ac_shtool="./shtool"
+ T_MD=`$ac_shtool echo -n -e %B`
+ T_ME=`$ac_shtool echo -n -e %b`
+ PLATFORM=`${CONFIG_SHELL-/bin/sh} ./config.guess`
+ PLATFORM=`${CONFIG_SHELL-/bin/sh} ./config.sub $PLATFORM`
+ MM_VERSION_STR="`$ac_shtool version -l c -d long mm_vers.c`"
+ AC_SUBST(MM_VERSION_STR)
+ 
+ dnl #   friendly header ;-)
+ echo "Configuring ${T_MD}MM${T_ME} (Shared Memory Library), Version ${T_MD}${MM_VERSION_STR}${T_ME}"
+ echo "Copyright (c) 1999-2000 Ralf S. Engelschall, All Rights Reserved."
+ echo "Platform: ${T_MD}${PLATFORM}${T_ME}"
+ 
+ dnl #   autoconf initialization
+ AC_INIT(README)
+ AC_CONFIG_HEADER(mm_conf.h)
+ AC_PREFIX_DEFAULT(/usr/local)
+ 
+ dnl #   determine build mode
+ AC_ARG_ENABLE(batch,dnl
+ [  --enable-batch          build in batch mode (default=no)],
+ enable_batch="$enableval",
+ if test ".$enable_batch" = .; then
+     enable_batch=no
+ fi
+ )dnl
+ 
+ dnl #
+ dnl #   determine build tools and parameters
+ dnl #
+ 
+ AC_CONFIGURE_PART(Build Tools)
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_CHECK_DEBUGGING
+ AC_SET_MAKE
+ AC_PROG_LIBTOOL
+ 
+ dnl #   support for some special platform/compiler options
+ case "$PLATFORM:$CC" in
+     *-hp-hpux*:cc ) CFLAGS="$CFLAGS -Ae +DAportable" ;;
+ esac
+ 
+ dnl #
+ dnl #   determine system parameters
+ dnl #
+ 
+ AC_CONFIGURE_PART(Platform Environment)
+ 
+ AC_HAVE_HEADERS(stdio.h stdlib.h string.h dnl 
+                 errno.h limits.h unistd.h fcntl.h dnl
+                 sys/stat.h sys/types.h)
+ AC_BEGIN_DECISION([mandatory system headers])
+ AC_IFALLYES(header:stdio.h header:stdlib.h header:string.h dnl
+             header:errno.h header:limits.h header:unistd.h header:fcntl.h dnl
+             header:sys/stat.h header:sys/types.h,
+             AC_DECIDE(fine, [all fine]))
+ AC_END_DECISION
+ 
+ AC_HAVE_HEADERS(memory.h)
+ AC_CHECK_FUNCS(memcpy memset bcopy)
+ AC_CHECK_DEFINE(_POSIX_PATH_MAX, limits.h)
+ AC_CHECK_DEFINE(PATH_MAX, limits.h)
+ AC_CHECK_DEFINE(MAXPATHLEN, sys/param.h)
+ AC_CHECK_DEFINE(_POSIX_CHILD_MAX, limits.h)
+ AC_CHECK_DEFINE(CHILD_MAX, limits.h)
+ 
+ dnl #   some special defines for brain dead platforms
+ case $PLATFORM in
+    *-*-sunos* ) AC_DEFINE(MM_OS_SUNOS)  ;;
+    BS2000-*-* ) AC_DEFINE(MM_OS_BS2000) ;;
+    *-*-beos*  ) AC_DEFINE(MM_OS_BEOS)   ;;
+ esac
+ 
+ dnl #
+ dnl #   method to determine virtual memory page size
+ dnl #
+ 
+ AC_CONFIGURE_PART(Virtual Memory Page Size)
+ 
+ AC_HAVE_HEADERS(unistd.h kernel/OS.h)
+ AC_HAVE_FUNCS(getpagesize sysconf)
+ AC_CHECK_DEFINE(_SC_PAGESIZE, unistd.h)
+ AC_CHECK_DEFINE(B_PAGE_SIZE, kernel/OS.h)
+ 
+ AC_BEGIN_DECISION([memory page size determination])
+ AC_IFALLYES(header:unistd.h func:getpagesize, 
+             AC_DECIDE(MM_VMPS_GETPAGESIZE, [4.2BSD getpagesize()]))
+ AC_IFALLYES(header:unistd.h func:sysconf define:_SC_PAGESIZE, 
+             AC_DECIDE(MM_VMPS_SYSCONF, [POSIX.1 sysconf(_SC_PAGESIZE)]))
+ AC_IFALLYES(header:kernel/OS.h define:B_PAGE_SIZE,
+             AC_DECIDE(MM_VMPS_BEOS, [BeOS B_PAGE_SIZE])) 
+ AC_END_DECISION
+ AC_DEFINE_UNQUOTED($ac_decision)
+ 
+ dnl #
+ dnl #   Shared Memory
+ dnl #
+ 
+ AC_CONFIGURE_PART(Shared Memory Implementation)
+ 
+ AC_HAVE_HEADERS(sys/mman.h)
+ AC_CHECK_DEFINE(MAP_ANON, sys/mman.h)
+ AC_HAVE_FUNCS(mmap munmap shm_open shm_unlink)
+ AC_TEST_FILE(/dev/zero)
+ AC_HAVE_HEADERS(sys/ipc.h sys/shm.h sys/file.h)
+ AC_HAVE_FUNCS(shmget shmat shmdt shmctl)
+ AC_HAVE_HEADERS(kernel/OS.h)
+ AC_HAVE_FUNCS(create_area)
+ 
+ AC_BEGIN_DECISION([shared memory allocation method])
+ AC_IFALLYES(header:kernel/OS.h func:create_area,
+             AC_DECIDE(MM_SHMT_BEOS, [BeOS areas]))
+ AC_IFALLYES(header:sys/mman.h func:mmap func:munmap, 
+             AC_DECIDE(MM_SHMT_MMFILE, [Classical mmap() on temporary file]))
+ AC_IFALLYES(header:sys/mman.h func:mmap func:munmap func:shm_open func:shm_unlink, 
+             AC_DECIDE(MM_SHMT_MMPOSX, [mmap() via POSIX.1 shm_open() on temporary file]))
+ AC_IFALLYES(header:sys/mman.h func:mmap func:munmap file:/dev/zero, 
+             AC_DECIDE(MM_SHMT_MMZERO, [SVR4-style mmap() on /dev/zero]))
+ AC_IFALLYES(header:sys/ipc.h header:sys/shm.h header:sys/file.h dnl
+             func:shmget func:shmat func:shmdt func:shmctl,
+             AC_DECIDE(MM_SHMT_IPCSHM, [SysV IPC shmget()]))
+ AC_IFALLYES(header:sys/mman.h func:mmap func:munmap define:MAP_ANON, 
+             AC_DECIDE(MM_SHMT_MMANON, [4.4BSD-style mmap() via MAP_ANON]))
+ case $PLATFORM in
+     *-*-linux* )
+         #   Unfortunately, Linux has many problems, so we have to do
+         #   more granular manual decisions here. The background is:
+         #   MM_SHMT_IPCSHM:
+         #       Supported under Linux 2.0 and upwards. Works out of the
+         #       box on Linux 2.2, but requires an explicitly mounted shm
+         #       filesystem under 2.3 only. The requirement for the shm
+         #       filesystem should be gone with Linux 2.4.
+         #   MM_SHMT_MMANON:
+         #       Not allowed up to and included to Linux 2.2.
+         #       Should be supported in Linux 2.3, but still hangs there.
+         #       Will be supported from Linux 2.4 on the first time really.
+         #   MM_SHMT_MMZERO:
+         #       Not allowed up to and included to Linux 2.2.
+         #       Should be supported in Linux 2.3, but still hangs there.
+         #       Will be supported from Linux 2.4 on the first time really.
+         #   MM_SHMT_MMFILE:
+         #       Works on Linux versions. 
+         case $PLATFORM in
+             *-linux1* )
+                 AC_DECISION_FORCE(MM_SHMT_MMFILE)
+                 ;;
+             *-*-linux2.0* )
+                 AC_DECISION_FORCE(MM_SHMT_IPCSHM)
+                 ;;
+             *-*-linux2.[12]* )
+                 AC_DECISION_FORCE(MM_SHMT_IPCSHM)
+                 ;;
+             *-*-linux2.3* )
+                 if test ".`df 2>/dev/null | grep shm`" != .; then
+                     AC_DECISION_FORCE(MM_SHMT_IPCSHM)
+                 else
+                     AC_DECISION_FORCE(MM_SHMT_MMFILE)
+                 fi
+                 ;;
+             * )
+                 AC_DECISION_OVERRIDE(MM_SHMT_MMFILE MM_SHMT_MMZERO MM_SHMT_MMPOSX MM_SHMT_MMANON MM_SHMT_IPCSHM)
+         esac
+         ;;
+ esac
+ AC_ARG_WITH(shm,dnl
+ [  --with-shm=TYPE         force shared memory type: MMFILE MMZERO MMPOSX MMANON IPCSHM BEOS],
+ AC_DECISION_FORCE(MM_SHMT_$withval)
+ )dnl
+ AC_END_DECISION
+ AC_DEFINE_UNQUOTED($ac_decision)
+ 
+ AC_CHECK_MAXSEGSIZE($ac_decision)
+ 
+ dnl #
+ dnl #   Mutex
+ dnl #
+ 
+ AC_CONFIGURE_PART(Mutual Exclusion Implementation)
+ 
+ AC_HAVE_HEADERS(sys/ipc.h sys/sem.h sys/file.h)
+ AC_HAVE_FUNCS(semget semctl)
+ AC_CHECK_DEFINE(LOCK_EX, sys/file.h)
+ AC_CHECK_DEFINE(F_SETLK, fcntl.h)
+ AC_CHECK_DEFINE(IPC_PRIVATE, sys/ipc.h)
+ AC_CHECK_DEFINE(SEM_UNDO, sys/sem.h)
+ AC_HAVE_HEADERS(kernel/OS.h)
+ AC_CHECK_FUNCS(create_sem)
+ 
+ AC_MSG_CHECKING(whether union semun is defined in sys/sem.h)
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/ipc.h>
+ #include <sys/sem.h>
+ ],[
+ union semun arg;
+ semctl(0, 0, 0, arg);
+ ],
+ AC_DEFINE(HAVE_UNION_SEMUN)
+ msg=yes,dnl
+ msg=no)
+ AC_MSG_RESULT([$msg])
+ 
+ AC_BEGIN_DECISION([mutex implementation method])
+ AC_IFALLYES(header:sys/file.h define:LOCK_EX, 
+             AC_DECIDE(MM_SEMT_FLOCK, [4.2BSD-style flock() on temporary file]))
+ AC_IFALLYES(header:sys/ipc.h header:sys/sem.h header:sys/file.h dnl
+             func:semget func:semctl,
+             AC_DECIDE(MM_SEMT_IPCSEM, [SysV IPC semget()]))
+ AC_IFALLYES(header:fcntl.h define:F_SETLK, 
+             AC_DECIDE(MM_SEMT_FCNTL, [SVR4-style fcntl() on temporary file]))
+ AC_IFALLYES(header:kernel/OS.h func:create_sem,
+             AC_DECIDE(MM_SEMT_BEOS, [BeOS semaphores]))
+ AC_ARG_WITH(sem,dnl
+ [  --with-sem=TYPE         force semaphore type: FLOCK FCNTL IPCSEM BEOS],
+ AC_DECISION_FORCE(MM_SEMT_$withval)
+ )dnl
+ AC_END_DECISION
+ AC_DEFINE_UNQUOTED($ac_decision)
+ 
+ dnl #
+ dnl #   finally: source file substitution...
+ dnl #
+ 
+ AC_CONFIGURE_PART(Output Substitution)
+ 
+ AC_OUTPUT(dnl
+ Makefile dnl
+ mm-config dnl
+ ,dnl
+ chmod a+x mm-config
+ )dnl
+ 
+ if test ".$enable_batch" != .yes; then
+     echo ""
+     echo "Now please type \`${T_MD}make${T_ME}' to compile. Good luck."
+     echo ""
+ fi
+ 
+ dnl ##EOF##

CVSTrac 2.0.1