Revert change #20462 (except the regression test),
[p5sagit/p5-mst-13.2.git] / configure.com
index 6933eaa..d0a08c5 100644 (file)
@@ -50,9 +50,11 @@ $ use_vmsdebug_perl = "n"
 $ use64bitall = "n"
 $ use64bitint = "n"
 $ uselargefiles = "n"
+$ usestdstat = "n"
 $ usesitecustomize = "n"
 $ C_Compiler_Replace = "CC="
-$ Thread_Live_Dangerously = "MT="
+$ thread_upcalls = "MTU="
+$ thread_kernel = "MTK="
 $ use_two_pot_malloc = "N"
 $ use_pack_malloc = "N"
 $ use_debugmalloc = "N"
@@ -903,7 +905,7 @@ $   config_symbols1 ="|installprivlib|installscript|installsitearch|installsitel
 $   config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|"
 $   config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|usemultiplicity|usemymalloc|usedebugging_perl|useperlio|usesecurelog|"
 $   config_symbols4 ="|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
-$   config_symbols5 ="|buildmake|builder|"
+$   config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads"
 $!  
 $   open/read CONFIG 'config_sh'
 $   rd_conf_loop:
@@ -2433,28 +2435,50 @@ $       use_5005_threads="N"
 $     ELSE
 $       use_5005_threads="Y"
 $     ENDIF
-$     ! Are they on VMS 7.1 on an alpha or itanium?
-$     if (archname.nes."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
+$     ! Are they on VMS 7.1 or greater?
+$     IF "''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.1"
 $     THEN
 $       echo ""
-$       echo "Threaded perl can be linked to use multiple kernel threads"
-$       echo "and system upcalls on VMS 7.1+ on Alpha systems.  This feature"
-$       echo "allows multiple threads to execute simultaneously on an SMP"
-$       echo "system as well as preventing a single thread from blocking"
-$       echo "all the threads in a program, even on a single-processor"
-$       echo "machine.  Unfortunately, this feature isn't safe on an"
-$       echo "unpatched 7.1 system (several OS patches were required when"
-$       echo "this procedure was written)."
-$       bool_dflt = "n"
-$       rp = "Enable multiple kernel threads and upcalls? [''bool_dflt'] "
+$      echo "Threaded Perl can be linked to use system upcalls on your system. This feature"
+$      echo "allows the thread scheduler to be made aware of system events (such as I/O)"
+$      echo "so as to prevent a single thread from blocking all the threads in a program,"
+$      echo "even on a single-processor machine."
+$      bool_dflt = "y"
+$      IF f$type(usethreadupcalls) .NES. ""
+$      THEN
+$              if .not. usethreadupcalls .or. usethreadupcalls .eqs. "undef" then bool_dflt="n"
+$      ENDIF
+$       rp = "Enable thread upcalls? [''bool_dflt'] "
 $       gosub myread
-$       if ans
+$       IF ans
 $       THEN
-$         Thread_Live_Dangerously = "MT=MT=1"
+$           thread_upcalls = "MTU=MTU=1"
+$          usethreadupcalls = "define"
+$          ! Are they on alpha or itanium?
+$          IF (archname .NES. "VMS_VAX") .AND. ("''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.2")
+$          THEN
+$              echo ""
+$              echo "Threaded Perl can be linked to use multiple kernel threads on your system."
+$              echo "This feature allows multiple user threads to make use of multiple CPUs on
+$              echo "a multi-processor machine."
+$              bool_dflt = "n"
+$              IF f$type(usekernelthreads) .nes. ""
+$              THEN
+$                      if usekernelthreads .or. usekernelthreads .eqs. "define" then bool_dflt="y"
+$              ENDIF
+$              rp = "Enable multiple kernel threads? [''bool_dflt'] "
+$              gosub myread
+$              IF ans
+$              THEN
+$                  thread_kernel = "MTK=MTK=1"
+$                  usekernelthreads = "define"
+$           ENDIF
 $       ENDIF
 $     ENDIF
 $   ENDIF
 $ ENDIF
+$ IF F$TYPE(usethreadupcalls) .EQS. "" THEN usethreadupcalls = "undef"
+$ IF F$TYPE(usekernelthreads) .EQS. "" THEN usekernelthreads = "undef"
 $ IF archname .NES. "VMS_VAX"
 $ THEN
 $! Case sensitive?
@@ -4849,6 +4873,8 @@ $  ENDIF
 $!
 $  IF uselargefiles .OR. uselargefiles .eqs. "define"
 $  THEN
+$    echo4 "Largefile support enabled (plus standard stat support on V8.2 and later)"
+$    usestdstat = "y"
 $    IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
 $    THEN
 $      echo4 -
@@ -5593,13 +5619,12 @@ $ WC "cccdlflags='" + cccdlflags + "'"
 $ WC "ccdlflags='" + ccdlflags + "'"
 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
 $ THEN
-$!    Perl can not use _USE_STD_STAT at the moment
-$!    IF d_symlink .OR. d_symlink .EQS. "define"
-$!    THEN
-$!     ccdefines = "_USE_STD_STAT=1"
-$!    ELSE
+$    IF usestdstat .OR. usestdstat .EQS. "define"
+$    THEN
+$      ccdefines = "_USE_STD_STAT=1"
+$    ELSE
 $      ccdefines = "_LARGEFILE=1"
-$!    ENDIF
+$    ENDIF
 $ ELSE
 $     ccdefines = ""
 $ ENDIF
@@ -5678,6 +5703,7 @@ $ WC "d_copysignl='define'"
 $ WC "d_crypt='define'"
 $ WC "d_csh='undef'"
 $ WC "d_cuserid='define'"
+$ WC "d_c99_variadic_macros='undef'"
 $ WC "d_dbl_dig='define'"
 $ WC "d_dbminitproto='undef'"
 $ WC "d_difftime='define'"
@@ -5766,6 +5792,7 @@ $ WC "d_grpasswd='undef'"
 $ WC "d_hasmntopt='undef'"
 $ WC "d_htonl='" + d_htonl + "'"
 $ WC "d_ilogbl='undef'"
+$ WC "d_inc_version_list='undef'"
 $ WC "d_index='" + d_index + "'"
 $ WC "d_inetaton='undef'"
 $ WC "d_int64_t='" + d_int64_t + "'"
@@ -5904,6 +5931,7 @@ $ WC "d_shmatprototype='undef'"
 $ WC "d_sigaction='" + d_sigaction + "'"
 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
+$ WC "d_sitearch='define'"
 $ WC "d_sockatmark='undef'"
 $ WC "d_sockatmarkproto='undef'"
 $ WC "d_socket='" + d_socket + "'"
@@ -6253,7 +6281,14 @@ $ WC "shmattype='" + " '"
 $ WC "shortsize='" + shortsize + "'"
 $ WC "shrplib='define'"
 $ WC "sig_name='" + sig_name + "'"
-$ WC "sig_name_init='" + sig_name_init + "'"
+$ IF (f$length(sig_name_init) .GE. 1024)
+$ THEN
+$     tmp = "sig_name_init='" + sig_name_init + "'"
+$     WC/symbol tmp
+$     DELETE/SYMBOL tmp
+$ ELSE
+$     WC "sig_name_init='" + sig_name_init + "'"
+$ ENDIF
 $ WC "sig_num='" + sig_num + "'"
 $ WC "sig_num_init='" + sig_num_init + "'"
 $ WC "sig_count='" + sig_count + "'"
@@ -6309,6 +6344,7 @@ $ WC "usedl='" + usedl + "'"
 $ WC "usefaststdio='" + usefaststdio + "'"
 $ WC "useieee='" + useieee + "'"                    ! VMS-specific
 $ WC "useithreads='" + useithreads + "'"
+$ WC "usekernelthreads='" + usekernelthreads + "'"     ! VMS-specific
 $ WC "uselargefiles='" + uselargefiles + "'"
 $ WC "uselongdouble='" + uselongdouble + "'"
 $ WC "usemorebits='" + usemorebits + "'"
@@ -6322,6 +6358,7 @@ $ WC "usesecurelog='" + usesecurelog + "'"  ! VMS-specific
 $ WC "usesitecustomize='" + usesitecustomize + "'"
 $ WC "usesocks='undef'"
 $ WC "usethreads='" + usethreads + "'"
+$ WC "usethreadupcalls='" + usethreadupcalls + "'"     ! VMS-specific
 $ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
 $ WC "usevfork='true'"
 $ WC "usevmsdebug='" + usevmsdebug + "'"     ! VMS-specific
@@ -6626,13 +6663,12 @@ $   MALLOC_REPLACE = "MALLOC="
 $ ENDIF
 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
 $ THEN
-$!    Perl can not use _USE_STD_STAT at the moment
-$!   IF d_symlink .or. d_symlink .eqs. "define"
-$!   THEN
-$!      LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
-$!   ELSE
+$   IF usestdstat .or. usestdstat .eqs. "define"
+$   THEN
+$      LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
+$   ELSE
 $      LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1"
-$!   ENDIF
+$   ENDIF
 $ ELSE
 $   LARGEFILE_REPLACE = "LARGEFILE="
 $ ENDIF
@@ -6640,7 +6676,7 @@ $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
 $ DEFINE/USER_MODE sys$output 'UUmakefile'
 $ mcr []munchconfig 'config_sh' 'Makefile_SH' "''DECC_REPLACE'" "''DECCXX_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" -
 "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" -
-"''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'" "''LARGEFILE_REPLACE'"
+"''THREAD_UPCALLS'" "''THREAD_KERNEL'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'" "''LARGEFILE_REPLACE'"
 $! Clean up after ourselves
 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
 $!