--- autofs-4.1.3.orig/configure.in	2004-05-02 16:31:40.000000000 +0800
+++ autofs-4.1.3/configure.in	2004-05-11 22:12:59.000000000 +0800
@@ -134,15 +134,16 @@
 cat > pietest.c <<EOF
 int main(void) { return 0; }
 EOF
-CFLAGS=-fpie
+CFLAGS=-fPIE
+LDFLAGS=-pie
 DAEMON_CFLAGS=
 DAEMON_LDFLAGS=
-AC_MSG_CHECKING([whether gcc accepts -fpie])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
-		  [gcc_supports_pie=yes], [gcc_supports_pie=no])
+AC_MSG_CHECKING([whether gcc -fPIE works])
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
+	      [gcc_supports_pie=yes], [gcc_supports_pie=no])
 AC_MSG_RESULT([$gcc_supports_pie])
 if test $gcc_supports_pie = yes ; then
-	DAEMON_CFLAGS="-fpie"
+	DAEMON_CFLAGS="-fPIE"
 	DAEMON_LDFLAGS="-pie"
 fi
 rm -f pietest.c
