diff --git a/configure.ac b/configure.ac
index 00a94e636dee6b1864414ed4d028145fa5fd9a64..dcc12495726c9f9f82c13a6343281a699258f269 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,13 +37,6 @@ AM_CONFIG_HEADER([config.h])
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_CC
-dnl
-dnl quick hack for icc
-dnl
-if test "`basename $CC`" = "icc"; then
-    lt_cv_prog_cc_wl='-Wl,'
-fi
-
 AC_PROG_F77
 dnl
 dnl Mmmh. Quite elaborated nowadays
@@ -52,10 +45,16 @@ AC_F77_WRAPPERS
 AC_F77_MAIN
 AC_F77_LIBRARY_LDFLAGS
 
+dnl
+dnl quick and very dirty hack for icc
+dnl
+if test `basename $CC` = icc; then
+	GCC=yes
+fi
 AC_PROG_LIBTOOL
-
-
-
+if test `basename $CC` = icc; then
+	GCC=no
+fi
 # change the installation directory. This could surely be done more elegantly...
 AC_PREFIX_DEFAULT([`pwd`])