Index: b/HDF4/configure.ac
===================================================================
--- a/HDF4/configure.ac
+++ b/HDF4/configure.ac
@@ -801,7 +801,7 @@
 ## These header files should probably be generated by autoconf instead
 ## of being copied depending upon the host.
 case "$host" in
-  *-linux*)             BAR="linux"       ;;
+  *-linux*|*-k*bsd*-gnu|*-gnu*)BAR="linux"       ;;
   *-freebsd*)           BAR="fbsd"        ;;
   *-ibm-aix*)           BAR="aix"         ;;
   sparc64-*-solaris2*)  BAR="solaris64"   ;;
Index: b/HDF4/hdf/src/hdfi.h
===================================================================
--- a/HDF4/hdf/src/hdfi.h	2014-09-13 23:09:17.689485898 +0200
+++ b/HDF4/hdf/src/hdfi.h	2014-09-13 23:10:32.453487107 +0200
@@ -1392,7 +1392,7 @@
 /*-----------------------------------------------------*/
 #endif /*power PC 5 64 */
 /* Linux 64 */
-#if defined(__linux__) && defined __x86_64__  && !(defined  SUN)  /* i.e. 64-bit Linux  but not SunOS on Intel */
+#if defined(__GLIBC__) && defined __x86_64__  && !(defined  SUN)  /* i.e. 64-bit Linux  but not SunOS on Intel */
 
 #ifdef GOT_MACHINE
 If you get an error on this line more than one machine type has been defined.
