summaryrefslogtreecommitdiff
path: root/vms/subconfigure.com
diff options
context:
space:
mode:
Diffstat (limited to 'vms/subconfigure.com')
-rw-r--r--vms/subconfigure.com111
1 files changed, 92 insertions, 19 deletions
diff --git a/vms/subconfigure.com b/vms/subconfigure.com
index 50d178f898..8222860122 100644
--- a/vms/subconfigure.com
+++ b/vms/subconfigure.com
@@ -16,6 +16,14 @@ $ Dec_C_Version := "''Dec_C_Version'"
$ Dec_C_Version = Dec_C_Version + 0
$ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
$ perl_extensions := "''extensions'"
+$ if f$length(Mcc) .eq. 0 then Mcc := "cc"
+$ MCC = f$edit(mcc, "UPCASE")
+$ IF Mcc.eqs."CC
+$ THEN
+$ C_Compiler_Replace := "CC="
+$ ELSE
+$ C_Compiler_Replace := "CC=CC=''Mcc'"
+$ ENDIF
$ if "''Using_Dec_C'" .eqs. "Yes"
$ THEN
$ Checkcc := "''Mcc'/prefix=all"
@@ -23,7 +31,6 @@ $ ELSE
$ Checkcc := "''Mcc'"
$ ENDIF
$ cc_flags = ""
-$ if f$length(Mcc) .eq. 0 then Mcc := "cc"
$! Some constant defaults.
$
$ hwname = f$getsyi("HW_NAME")
@@ -31,13 +38,7 @@ $ myname = myhostname
$ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
$ perl_package="''package'"
$ perl_baserev = "''baserev'"
-$ cc_defines="DEBUGGING"
-$ IF ("''Has_Socketshr'".eqs."T") .or. ("''Has_Dec_C_Sockets'".eqs."T") THEN cc_defines = cc_defines + ",VMS_DO_SOCKETS"
-$ if ("''Has_Dec_C_Sockets'".eqs."T") then cc_defines = cc_defines + ",DECCRTL_SOCKETS"
-$! if ("''Use_Threads'".eqs."T")
-$! then
-$! cc_defines = cc_defines + ",MULTIPLICITY"
-$! endif
+$ cc_defines=""
$ perl_CONFIG="true"
$ perl_i_netdb="undef"
$ perl_d_gnulibc="undef"
@@ -409,7 +410,9 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(double));
+$ WS "int foo;
+$ WS "foo = sizeof(double);
+$ WS "printf(""%d\n"", foo);
$ WS "exit(0);
$ WS "}"
$ CS
@@ -450,7 +453,7 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(long double));
+$ WS "printf(""%d\n"", sizeof(long double));
$ WS "exit(0);
$ WS "}"
$ CS
@@ -508,7 +511,7 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(long long));
+$ WS "printf(""%d\n"", sizeof(long long));
$ WS "exit(0);
$ WS "}"
$ CS
@@ -557,7 +560,7 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(int));
+$ WS "printf(""%d\n"", sizeof(int));
$ WS "exit(0);
$ WS "}"
$ CS
@@ -603,7 +606,7 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(short));
+$ WS "printf(""%d\n"", sizeof(short));
$ WS "exit(0);
$ WS "}"
$ CS
@@ -643,7 +646,9 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(long));
+$ WS "int foo;
+$ WS "foo = sizeof(long);
+$ WS "printf(""%d\n"", foo);
$ WS "exit(0);
$ WS "}"
$ CS
@@ -1599,10 +1604,14 @@ $ WS "#endif
$ WS "#include <stdio.h>
$ WS "int main()
$ WS "{"
-$ WS "printf(""%i\n"", sizeof(void *));
+$ WS "int foo;
+$ WS "foo = sizeof(char *);
+$ WS "printf(""%d\n"", foo);
$ WS "exit(0);
$ WS "}"
$ CS
+$! copy temp.c sys$output
+$!
$ DEFINE SYS$ERROR _NLA0:
$ DEFINE SYS$OUTPUT _NLA0:
$ ON ERROR THEN CONTINUE
@@ -1818,11 +1827,11 @@ $ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
$ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
$ if "''Using_Dec_C'" .eqs. "Yes"
$ THEN
-$ perl_ccflags="/Define=(''cc_defines')/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
+$ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
$ ELSE
$ IF "''Using_Vax_C'" .eqs. "Yes"
$ THEN
-$ perl_ccflags="/Define=(''cc_defines')/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
+$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
$ ENDIF
$ ENDIF
$!
@@ -2228,8 +2237,64 @@ $ else
$ link munchconfig
$ endif
$ WRITE_RESULT "Writing config.h"
-$ define/user sys$output [-]config.h
+$ !
+$ ! we need an fdl file
+$ CREATE [-]CONFIG.FDL
+RECORD
+ FORMAT STREAM_LF
+$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
+$ ! First spit out the header info with the local defines (to get
+$ ! around the 255 character command line limit)
+$ OPEN/APPEND CONFIG [-]config.local
+$ if use_debugging_perl.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define DEBUGGING"
+$ ENDIF
+$ if preload_env.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define PRIME_ENV_AT_STARTUP"
+$ ENDIF
+$ if use_two_pot_malloc.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define TWO_POT_OPTIMIZE"
+$ endif
+$ if mymalloc.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define EMBEDMYMALLOC"
+$ ENDIF
+$ if use_pack_malloc.eqs."Y"
+$ THEN
+$ WRITE CONFIG "#define PACK_MALLOC"
+$ endif
+$ if use_debugmalloc.eqs."Y"
+$ THEN
+$ write config "#define DEBUGGING_MSTATS"
+$ ENDIF
+$ if "''Using_Gnu_C'" .eqs."Yes"
+$ THEN
+$ WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
+$ ENDIF
+$ if "''Has_Dec_C_Sockets'".eqs."T"
+$ THEN
+$ WRITE CONFIG "#define VMS_DO_SOCKETS"
+$ WRITE CONFIG "#define DECCRTL_SOCKETS"
+$ ENDIF
+$ if "''Has_Socketshr'".eqs."T"
+$ THEN
+$ WRITE CONFIG "#define VMS_DO_SOCKETS"
+$ ENDIF
+$ CLOSE CONFIG
+$!
+$! Now build the normal config.h
+$ define/user sys$output [-]config.main
$ mcr []munchconfig [-]config.sh [-]config_h.sh
+$ ! Concatenate them together
+$ copy [-]config.local,[-]config.main [-]config.h
+$! Clean up
+$ DELETE/NOLOG [-]CONFIG.MAIN;*
+$ DELETE/NOLOG [-]CONFIG.LOCAL;*
+$ DELETE/NOLOG [-]CONFIG.FDL;*
+$!
$ if "''Using_Dec_C'" .eqs."Yes"
$ THEN
$ DECC_REPLACE = "DECC=decc=1"
@@ -2261,6 +2326,14 @@ $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
$ ELSE
$ THREAD_REPLACE = "THREAD=THREADED=1"
$ ENDIF
+$ ELSE
+$ THREAD_REPLACE = "THREAD="
+$ ENDIF
+$ if mymalloc.eqs."Y"
+$ THEN
+$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
+$ ELSE
+$ MALLOC_REPLACE = "MALLOC="
$ ENDIF
$ if f$getsyi("HW_MODEL").ge.1024
$ THEN
@@ -2271,7 +2344,7 @@ $ ENDIF
$ WRITE_RESULT "Writing DESCRIP.MMS"
$!set ver
$ define/user sys$output [-]descrip.mms
-$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'"
+$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'"
$! set nover
$!
$! Clean up after ourselves