[Mew-dist 06185] Re: UseCL=yes for Solaris 2.x

なかじ nakaji at example.com
1998年 8月 27日 (木) 19:05:14 JST


中治@京大防災研です。

>>>>> "ま" == Makoto MATSUSHITA (まつしたまこと) <matusita at example.com> writes:

ま> という気が私もなんとなくした[注1]ので‥‥例えば
(略)
ま> こんな感じ,とかどうでしょうか.

こんなんでしょうか?オリジナルの im-99 からの diff -u です。

Index: configure
===================================================================
RCS file: /home/nakaji/cvsroot/im-nakaji/configure,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure
--- configure	1998/08/27 04:24:04	1.1.1.1
+++ configure	1998/08/27 09:57:23
@@ -629,10 +629,73 @@
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:634: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 649 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 666 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
 
 im_version="version 980824"
 im_revised="Aug 24, 1998"
 im_file_attr="O_RDWR|O_CREAT|O_EXCL"
+im_nosync=no
+
 
 
 
@@ -646,7 +709,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:650: checking for $ac_word" >&5
+echo "configure:713: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'im_cv_path_im_path_perl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -687,7 +750,7 @@
    exit 1
 esac
 echo $ac_n "checking for site_perl""... $ac_c" 1>&6
-echo "configure:691: checking for site_perl" >&5
+echo "configure:754: checking for site_perl" >&5
 if eval "test \"`echo '$''{'im_cv_path_im_path_siteperl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -713,7 +776,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:717: checking for $ac_word" >&5
+echo "configure:780: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_im_path_chmod'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -750,7 +813,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:754: checking for $ac_word" >&5
+echo "configure:817: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_im_path_cp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -787,7 +850,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:791: checking for $ac_word" >&5
+echo "configure:854: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_im_path_mkdir'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -824,7 +887,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:828: checking for $ac_word" >&5
+echo "configure:891: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_im_path_rm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -857,7 +920,7 @@
 test -n "$im_path_rm" || im_path_rm="missing_rm"
 
 echo $ac_n "checking for DB type""... $ac_c" 1>&6
-echo "configure:861: checking for DB type" >&5
+echo "configure:924: checking for DB type" >&5
 if eval "test \"`echo '$''{'im_cv_perl_im_db_type'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -898,7 +961,7 @@
 
 if test "${enable_inet6+set}" != set; then
 	echo $ac_n "checking for IPv6 Perl""... $ac_c" 1>&6
-echo "configure:902: checking for IPv6 Perl" >&5
+echo "configure:965: checking for IPv6 Perl" >&5
 	cat > conftest.pl <<EOF
 use Socket;
 print AF_INET6 . "\n";
@@ -921,6 +984,60 @@
 	im_inet6_pack_sockaddr_in6="pack('CCnN', 1+1+2+4+16, \$family, \$port, 0) . \$he_addr"
 fi
 
+for im_check_headers in sys/syscall.h syscall.h
+do
+	ac_safe=`echo "$im_check_headers" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $im_check_headers""... $ac_c" 1>&6
+echo "configure:992: checking for $im_check_headers" >&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 997 "configure"
+#include "confdefs.h"
+#include <$im_check_headers>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat > conftest.$ac_ext <<EOF
+#line 1019 "configure"
+#include "confdefs.h"
+#include <$im_check_headers>
+			 #ifdef SYS_fsync
+			 sys_fsync_is_found
+			 #endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "sys_fsync_is_found" >/dev/null 2>&1; then
+  rm -rf conftest*
+  im_nosync=no
+else
+  rm -rf conftest*
+  im_nosync=yes
+fi
+rm -f conftest*
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -1105,6 +1222,7 @@
 s%@host_cpu@%$host_cpu%g
 s%@host_vendor@%$host_vendor%g
 s%@host_os@%$host_os%g
+s%@CPP@%$CPP%g
 s%@im_version@%$im_version%g
 s%@im_revised@%$im_revised%g
 s%@im_rpop@%$im_rpop%g
@@ -1112,6 +1230,7 @@
 s%@im_file_attr@%$im_file_attr%g
 s%@im_inet6_family@%$im_inet6_family%g
 s%@im_inet6_pack_sockaddr_in6@%$im_inet6_pack_sockaddr_in6%g
+s%@im_nosync@%$im_nosync%g
 s%@im_path_perl@%$im_path_perl%g
 s%@im_path_siteperl@%$im_path_siteperl%g
 s%@im_path_chmod@%$im_path_chmod%g
Index: configure.in
===================================================================
RCS file: /home/nakaji/cvsroot/im-nakaji/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in	1998/08/27 04:24:04	1.1.1.1
+++ configure.in	1998/08/27 09:57:14
@@ -18,10 +18,12 @@
 dnl Checks for programs.
 AC_PROG_INSTALL()
 AC_CANONICAL_HOST
+AC_PROG_CPP
 
 im_version="version 980824"
 im_revised="Aug 24, 1998"
 im_file_attr="O_RDWR|O_CREAT|O_EXCL"
+im_nosync=no
 
 AC_SUBST(im_version)
 AC_SUBST(im_revised)
@@ -30,6 +32,7 @@
 AC_SUBST(im_file_attr)
 AC_SUBST(im_inet6_family)
 AC_SUBST(im_inet6_pack_sockaddr_in6)
+AC_SUBST(im_nosync)
 IM_PATH_PERLV_PROGS(im_path_perl, perl perl5, PERL5_NOT_FOUND)
 case "$im_path_perl" in
 ""|PERL5_NOT_FOUND)
@@ -82,6 +85,19 @@
 	im_inet6_family='24'
 	im_inet6_pack_sockaddr_in6="pack('CCnN', 1+1+2+4+16, \$family, \$port, 0) . \$he_addr"
 fi
+
+dnl check fsync() is in syscall.h or sys/syscall.h
+for im_check_headers in sys/syscall.h syscall.h
+do
+	AC_CHECK_HEADER($im_check_headers,
+			AC_EGREP_CPP(sys_fsync_is_found,
+			[#include <$im_check_headers>
+			 #ifdef SYS_fsync
+			 sys_fsync_is_found
+			 #endif],
+			im_nosync=no,
+			im_nosync=yes),)
+done
 
 AC_OUTPUT(imali:imali.in imcat:imcat.in imcd:imcd.in imclean:imclean.in \
 	imget:imget.in imgrep:imgrep.in imhist:imhist.in \
Index: imsetup.in
===================================================================
RCS file: /home/nakaji/cvsroot/im-nakaji/imsetup.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 imsetup.in
--- imsetup.in	1998/08/27 04:24:05	1.1.1.1
+++ imsetup.in	1998/08/27 09:51:14
@@ -45,7 +45,7 @@
 my $mail = "Mail";
 my $news = "News";
 my $usecl = "no";
-my $nosync = "no";
+my $nosync = "@im_nosync@";
 
 my ($mhdir, $mhalias, $domain, $nntpservers);
 



Mew-dist メーリングリストの案内