summaryrefslogtreecommitdiff
path: root/devel/ccmalloc/files/patch5-configure
blob: 39b2b424f43b713d943b471f9aa5a532a93e3f34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--- configure.orig	Wed Feb  6 01:20:53 2002
+++ configure	Sat Apr  5 04:43:02 2003
@@ -27,7 +27,8 @@
 fmt="%-26s ..."
 debug=no
 prefix=/usr/local
-os=unsupported
+
+OPSYS=unsupported
 
 #--------------------------------------------------------------------------#
 # process command line options
@@ -40,7 +41,7 @@
       exit 0
       ;;
     --prefix=*)
-      prefix=`expr $1 : '--prefix=\(.*\)'`
+      prefix=`expr -- $1 : '--prefix=\(.*\)'`
       ;;
     --debug)
       debug=yes
@@ -70,26 +71,26 @@
   SunOS )
     case `uname -r` in
       5.* )
-        os=solaris
+        OPSYS=solaris
         ;;
     esac
     ;;
   Linux )
-    os=linux
+    OPSYS=linux
     ;;
   FreeBSD )
-    os=freebsd
+    OPSYS=freebsd
     ;;
 esac
 
-if [ $os = unsupported ]
+if [ $OPSYS = unsupported ]
 then
   echo 
   echo "*** configure: unsupported operating system" 1>&2
   exit 1
 fi
 
-echo " $os"
+echo " $OPSYS"
 
 #--------------------------------------------------------------------------#
 # search for C compilers
@@ -205,7 +206,7 @@
 }
 EOF
 
-case $os in
+case $OPSYS in
   freebsd )
     LIB=""
     ;;
@@ -285,8 +286,9 @@
 (
 echo "#ifndef _config_h_INCLUDED"
 [ $debug = no ] && echo "#define NDEBUG"
-[ $os = solaris ] && echo "#define OS_IS_SOLARIS"
-[ $os = linux ] && echo "#define OS_IS_LINUX"
+[ $OPSYS = solaris ] && echo "#define OS_IS_SOLARIS"
+[ $OPSYS = linux ] && echo "#define OS_IS_LINUX"
+[ $OPSYS = freebsd ] && echo "#define OS_IS_FREEBSD"
 [ $atexit = yes ] && echo "#define HAVE_ATEXIT"
 cat<<-EOF
 #define VERSION "$version"
@@ -319,6 +321,7 @@
 -e "s,@COMPILERS@,$COMPILERS,g" \
 -e "s,@VERSION@,$version,g" \
 -e "s,@TARGETS@,$TARGETS,g" \
+-e "s,@OPSYS@,$OPSYS,g" \
 Makefile.in > $dst
 
 echo >> $dst