]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Configure into a system-specific build subtree.
authorTed Lemon <source@isc.org>
Tue, 20 Jun 2000 19:42:30 +0000 (19:42 +0000)
committerTed Lemon <source@isc.org>
Tue, 20 Jun 2000 19:42:30 +0000 (19:42 +0000)
- Add support for just printing the system name, for the top-level Makefile.

configure

index ce2efce57b681de86b49a5c878c7e15a1e3c756c..93fbfb4dafb6c793386441aec2997cecf6c13b35 100755 (executable)
--- a/configure
+++ b/configure
@@ -2,12 +2,16 @@
 
 while [ $# != 0 ]; do
   if [ x$1 = x--with-nsupdate ]; then
-    nsupdate="-e /^##--nsupdate--/,/^##--nsupdate--/s/^#//"
+    echo "nsupdate is always built now."
   else
-   if [ x$sysname = x ]; then
-     sysname=$1
+   if [ x$1 = x--print-sysname ]; then
+    print_sysname=yes
     else
-       echo "Unexpected argument: $1"
+     if [ x$sysname = x ]; then
+       sysname=$1
+      else
+         echo "Unexpected argument: $1"
+      fi
     fi
   fi
   shift
@@ -82,28 +86,37 @@ if [ "$sysname" = "" ]; then
 fi
 
 if [ "$sysname" = "" ]; then
-  echo "UNIX name: $uname    machine: $machine"
-  echo
-  echo "Unknown system.   If this is an SCO system running ODT 3.0 or"
-  echo "higher, type \`\`./configure sco''.   Otherwise, this is a"
-  echo "configuration that isn't supported or hasn't been tested."
-  echo
-  echo "Supported configurations are:"
-  echo "   aix         AIX 4.1.5.0"
-  echo "   ultrix      ULTRIX 4.2A or higher"
-  echo "   bsdos       BSDI BSD/OS 2.1"
-  echo "   alphaosf    DEC Alpha OSF/1"
-  echo "   linux       Linux"
-  echo "   sunos4      Sunos 4.1.4 (earlier releases may work)"
-  echo "   sunos5-cc   Solaris 2.4 or higher with Sun cc"
-  echo "   sunos5-gcc  Solaris 2.4 or higher with gcc"
-  echo "   netbsd      NetBSD 1.1 or higher"
-  echo "   freebsd     FreeBSD"
-  echo "   openbsd      OpenBSD (i386/alpha)"
-  echo "   hpux                HP-UX"
-  echo "   qnx         QNX 4.2 or higher"
-  echo "   NEXTSTEP     NeXTSTEP"
-  exit 1;
+  if [ x$print_sysname = xyes ]; then
+    echo "unknown"
+  else
+    echo "UNIX name: $uname    machine: $machine"
+    echo
+    echo "Unknown system.   If this is an SCO system running ODT 3.0 or"
+    echo "higher, type \`\`./configure sco''.   Otherwise, this is a"
+    echo "configuration that isn't supported or hasn't been tested."
+    echo
+    echo "Supported configurations are:"
+    echo "   aix               AIX 4.1.5.0"
+    echo "   ultrix    ULTRIX 4.2A or higher"
+    echo "   bsdos     BSDI BSD/OS 2.1"
+    echo "   alphaosf  DEC Alpha OSF/1"
+    echo "   linux     Linux"
+    echo "   sunos4    Sunos 4.1.4 (earlier releases may work)"
+    echo "   sunos5-cc Solaris 2.4 or higher with Sun cc"
+    echo "   sunos5-gcc        Solaris 2.4 or higher with gcc"
+    echo "   netbsd    NetBSD 1.1 or higher"
+    echo "   freebsd   FreeBSD"
+    echo "   openbsd      OpenBSD (i386/alpha)"
+    echo "   hpux              HP-UX"
+    echo "   qnx               QNX 4.2 or higher"
+    echo "   NEXTSTEP     NeXTSTEP"
+    exit 1;
+  fi
+fi
+
+if [ x$print_sysname = xyes ]; then
+  echo $sysname
+  exit 0
 fi
 
 echo "System Type: $sysname"
@@ -113,11 +126,19 @@ if [ x$major != x ] && [ x$minor != x ]; then
   minversubst="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
 fi
 
+if [ ! -d ${sysname} ]; then
+  mkdir $sysname
+fi
+
 for foo in . client server relay common omapip dhcpctl minires; do
-        (sed $nsupdate $majversubst $minversubst \
+       if [ ! -d ${sysname}/$foo ]; then
+         mkdir ${sysname}/$foo
+       fi
+       (sed $majversubst $minversubst \
              -e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
-               <Makefile.conf; cat site.conf; cat $foo/Makefile.dist)  \
-                               >$foo/Makefile
+               <Makefile.conf; cat site.conf; \
+               echo "TOP = ../.."; cat $foo/Makefile.dist)     \
+                               >${sysname}/$foo/Makefile
 done
 
 exit 0