diff --git a/configure.ac b/configure.ac
index 78e3ed201228f5d95fd7854b19680a66fc90f4df..ded6443e38f84f1e99c122eaf0cdf6766d27fa5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@ AC_INIT([albert], [1.2], [dani@mathematik.uni-freiburg.de])
 AC_CONFIG_SRCDIR([ALBERT/src/Common/albert.h])
 
 AC_CONFIG_FILES([Makefile BLAS/Makefile ALBERT_UTIL/Makefile
+		 gnu-compat/Makefile
 		 GRAPE/Makefile GRAPE/mesh/Makefile
                  GRAPE/mesh/2d/Makefile
                  GRAPE/mesh/3d/Makefile
@@ -69,6 +70,12 @@ AC_CHECK_FUNCS([alarm pow sqrt strdup strchr strstr],,
 AC_FUNC_MALLOC
 AC_FUNC_VPRINTF
 
+AC_CHECK_FUNCS([getopt_long],[],
+	[AC_LIBOBJ([getopt])
+	AC_LIBOBJ([getopt1])
+	GNUCOMPAT_INCLUDE_PATH='$(top_srcdir)/gnu-compat/'])
+AC_SUBST([GNUCOMPAT_INCLUDE_PATH])
+
 # look for X11 library paths AND sets all necessary flags (X_CFLAGS) e.g.
 AC_PATH_XTRA