diff --git a/configure b/configure
index 2b5ae78e963b6ca9168e21ea657e5844d5344e06..cef901e231883543ed8da1129d0fcda4fc3da976 100755
--- a/configure
+++ b/configure
@@ -197,6 +197,10 @@ if check_define __linux__ ; then
   targetos="Linux"
 elif check_define _WIN32 ; then
   targetos='MINGW32'
+elif check_define __OpenBSD__ ; then
+  targetos='OpenBSD'
+elif check_define __sun__ ; then
+  targetos='SunOS'
 else
   targetos=`uname -s`
 fi