]> git.ipfire.org Git - thirdparty/dhcp.git/blobdiff - configure
MASSIVE merge from V3-RELEASE-BRANCH into HEAD. HEAD and V3-RELEASE are
[thirdparty/dhcp.git] / configure
index 3f504beb4128c46fa0bc65153ffdac56ba5ca308..eeb62ac0ee3ca3e4fe0a80b163c986204c19f86c 100755 (executable)
--- a/configure
+++ b/configure
@@ -70,6 +70,26 @@ if [ "$sysname" = "" ]; then
     OSF1)
       if [ $machine = 'alpha' ]; then
         sysname=alphaosf
+       # OSF1 has libc snprintf/vsnprintf support as of 4.0F.  There is
+       # no v4 & v5 portable compile-time way of knowing the system's
+       # version (we can #include a version-identing file, but it is only
+       # present in v5).
+       #
+       # So we rely on a system command, 'sizer', and default to
+       # no-snprintf if we can't find it.
+       if [ -x /usr/sbin/sizer ] ; then
+               release=`/usr/sbin/sizer -v | cut -d ' ' -f 4 | cut -c 2-`
+               major=`echo $release | cut -d . -f 1`
+               minor=`echo $release | cut -d . -f 2`
+               incr=`echo $minor | sed 's/[0-9]//g' | tr '[A-Z]' '[0-9]'`
+               minor=`echo $minor | sed 's/[A-Z]//g'`
+
+               if [ $major -gt 4 -o \
+                    $major -eq 4 -a $minor -gt 0 -o \
+                    $major -eq 4 -a $minor -eq 0 -a $incr -gt 5 ]; then
+                       copts="$copts -DHAVE_SNPRINTF"
+               fi
+       fi
       fi;;
     Linux)
       release=`uname -r`
@@ -114,12 +134,7 @@ if [ "$sysname" = "" ]; then
          fi;;
       esac;;
     NetBSD)
-      hw=`uname -m`
-      case $hw in
-       arm32) sysname=netbsd-nocast;;
-       alpha) sysname=netbsd-nocast;;
-       *) sysname=netbsd;;
-      esac;;
+      sysname=netbsd;;
     OpenBSD)
       sysname=openbsd;;
     FreeBSD)