$NetBSD$

--- configure.orig	2004-02-17 22:09:31.000000000 +0000
+++ configure
@@ -24265,6 +24265,7 @@ _ACEOF
 
       os_cflags="--D_THREAD_SAFE -pthread -I/usr/local/include";
       os_ldflags="-Wl,-export-dynamic -L/usr/local/lib";
+      DEFS=-D_BSD_SOURCE;
       ;;
     netbsd*)
       ZINF_OS="freebsd";
@@ -24275,6 +24276,7 @@ _ACEOF
 
       os_cflags="-I/usr/pkg/include -D_THREAD_SAFE -pthread";
       os_ldflags=" -L/usr/pkg/lib -Wl,-export-dynamic";
+      DEFS=-D_BSD_SOURCE;
       ;;
     irix*)
       ZINF_OS="irix"
@@ -25193,7 +25195,7 @@ echo $ECHO_N "checking for pthread_mutex
   ac_save_CFLAGS="$CFLAGS"
 
   if test x$pthread_xtra_defs = x ; then
-    CFLAGS="$CFLAGS -D__USE_UNIX98 -D_XOPEN_SOURCE=500"
+    CFLAGS="$CFLAGS -D__USE_UNIX98"
     pthread_xtra_defs="yes"
   fi
 
@@ -26384,10 +26386,10 @@ experimental="false"
 # Check whether --enable-experimental or --disable-experimental was given.
 if test "${enable_experimental+set}" = set; then
   enableval="$enable_experimental"
-  if test "x$enableval" == "xyes"; then experimental="true"; fi
+  if test "x$enableval" = "xyes"; then experimental="true"; fi
 fi;
 
-if test "x$experimental" == "xtrue" ; then
+if test "x$experimental" = "xtrue" ; then
 
 cat >>confdefs.h <<\_ACEOF
 #define EXPERIMENTAL 1
@@ -29340,7 +29342,7 @@ fi;
   fi
 
   # Extract the first word of "orbit-config", so it can be a program name with args.
-set dummy orbit-config; ac_word=$2
+set dummy orbit2-config; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_ORBIT_CONFIG+set}" = set; then
@@ -29389,7 +29391,7 @@ echo $ECHO_N "checking for ORBit - versi
     ORBIT_CFLAGS=`$ORBIT_CONFIG $orbit_config_args --cflags`
     ORBIT_LIBS=`$ORBIT_CONFIG $orbit_config_args --libs`
     orbit_config_major_version=`$ORBIT_CONFIG $orbit_config_args --version | \
-	   sed -e 's,[^0-9.],,g' -e 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+	   sed -e 's,ORBit2 ,,g' -e 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
     orbit_config_minor_version=`$ORBIT_CONFIG $orbit_config_args --version | \
 	   sed -e 's,[^0-9.],,g' -e 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
     orbit_config_micro_version=`$ORBIT_CONFIG $orbit_config_args --version | \
@@ -29410,7 +29412,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#include <orb/orbit.h>
+#include <orbit/orbit.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -29537,7 +29539,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#include <orb/orbit.h>
+#include <orbit/orbit.h>
 #include <stdio.h>
 
 int
@@ -29604,7 +29606,7 @@ rm -f conftest.err conftest.$ac_objext \
   fi
 
   # Extract the first word of "orbit-idl", so it can be a program name with args.
-set dummy orbit-idl; ac_word=$2
+set dummy orbit-idl-2; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_ORBIT_IDL+set}" = set; then
@@ -29749,7 +29751,7 @@ else
   enable_xosd_ui=no
 fi;
 
-if test "$enable_xosd_ui" == "yes"; then
+if test "$enable_xosd_ui" = "yes"; then
     UI_PLUGINS="$UI_PLUGINS xosd"
 else
    { echo "$as_me:$LINENO: Not building the XOSD plugin" >&5
@@ -29861,7 +29863,7 @@ s/^[^=]*=[	 ]*$//;
 }'
 fi
 
-DEFS=-DHAVE_CONFIG_H
+DEFS="-DHAVE_CONFIG_H $DEFS"
 
 ac_libobjs=
 ac_ltlibobjs=
