3 case $PERL_CONFIG_SH in
5 if test -f config.sh; then TOP=.;
6 elif test -f ../config.sh; then TOP=..;
7 elif test -f ../../config.sh; then TOP=../..;
8 elif test -f ../../../config.sh; then TOP=../../..;
9 elif test -f ../../../../config.sh; then TOP=../../../..;
11 echo "Can't find config.sh."; exit 1
16 : This forces SH files to create target in same directory as SH file.
17 : This is so that make depend always knows where to find SH derivatives.
19 */cflags.SH) cd `expr X$0 : 'X\(.*\)/'` ;;
23 *) if test -d x2p; then cd x2p
24 else echo "Can't figure out where to write output."; exit 1
28 echo "Extracting x2p/cflags (with variable substitutions)"
29 : This section of the file will have variable substitutions done on it.
30 : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
31 : Protect any dollar signs and backticks that you do not want interpreted
32 : by putting a backslash in front. You may delete these comments.
34 $spitshell >cflags <<!GROK!THIS!
37 : In the following dollars and backticks do not need the extra backslash.
38 $spitshell >>cflags <<'!NO!SUBS!'
39 case $PERL_CONFIG_SH in
41 if test -f config.sh; then TOP=.;
42 elif test -f ../config.sh; then TOP=..;
43 elif test -f ../../config.sh; then TOP=../..;
44 elif test -f ../../../config.sh; then TOP=../../..;
45 elif test -f ../../../../config.sh; then TOP=../../../..;
47 echo "Can't find config.sh."; exit 1
54 Xoptimize=*|X"optimize=*")
62 1) also='echo 1>&2 " CCCMD = "'
66 0) set *.c; echo "The current C flags are:" ;;
69 set `echo "$* " | sed -e 's/\.[oc] / /g' -e 's/\.obj / /g' -e "s/\\$obj_ext / /g"`
75 *) echo $n " $file.c $c" ;;
78 : allow variables like str_cflags to be evaluated
80 eval 'eval ${'"${file}_cflags"'-""}'
94 ccflags="`echo $ccflags | sed -e 's/-DMULTIPLICITY//'`"
96 echo "$cc -c $ccflags $optimize"
97 eval "$also "'"$cc -c $ccflags $optimize"'