$NetBSD$

* Add NetBSD support
* Detection of libdl is suspended (workaround for NetBSD)
* Improve portability (replace == with =)

--- configure.in.orig	2011-03-05 03:33:37.000000000 +0000
+++ configure.in
@@ -359,6 +359,12 @@ case $host in
   x86_64-*-linux-gnu*)
      ARCH="x86_64-linux"
      ;;
+  i*86*-*-netbsd*)
+       ARCH="i386-netbsd"
+       ;;
+  x86_64-*-netbsd*)
+       ARCH="x86_64-netbsd"
+       ;;
   i386-apple-darwin*)
      ARCH="x86-osx"
      # define i386 or x86_64, cannot use $HOSTTYPE as it reports x86_64 on 10.6 regardless of kernel flavor
@@ -644,7 +650,7 @@ else
   AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
   AC_CHECK_LIB([smbclient],  [main],, AC_MSG_ERROR($missing_library))
   AC_CHECK_LIB([SDL_mixer],  [main],, AC_MSG_ERROR($missing_library))
-  AC_CHECK_LIB([dl],         [main],, AC_MSG_ERROR($missing_library))
+#  AC_CHECK_LIB([dl],         [main],, AC_MSG_ERROR($missing_library))
   AC_CHECK_LIB([resolv],     [main],, AC_MSG_ERROR($missing_library))
   AC_CHECK_LIB([jasper],     [main],, AC_MSG_ERROR($missing_library)) # check for cximage
   AC_CHECK_LIB([tiff],       [main],, AC_MSG_ERROR($missing_library))
@@ -1620,7 +1626,7 @@ XB_CONFIG_MODULE([xbmc/cores/dvdplayer/C
       --disable-encoders \
       --enable-encoder=ac3 \
       --enable-encoder=aac \
-      `if test "$use_ffmpeg_libvorbis" == "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
+      `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
       --disable-devices \
       --disable-ffplay \
       --disable-ffserver \
@@ -1655,7 +1661,7 @@ XB_CONFIG_MODULE([xbmc/cores/dvdplayer/C
       --disable-encoders \
       --enable-encoder=ac3 \
       --enable-encoder=aac \
-      `if test "$use_ffmpeg_libvorbis" == "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
+      `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
       --disable-decoder=mpeg_xvmc \
       --disable-devices \
       --disable-ffplay \
