]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Change the order of the -fPIC and -KPIC tests to ensure that UnixWare
authorRichard Sharpe <sharpe@samba.org>
Tue, 10 Jul 2001 07:14:24 +0000 (07:14 +0000)
committerRichard Sharpe <sharpe@samba.org>
Tue, 10 Jul 2001 07:14:24 +0000 (07:14 +0000)
is handled.

source/configure.in

index 7c9bbf1baeb3eb275d6a0d922e90d61298376c7f..516104ffd715ade617641ac1b5cf3944be071386 100644 (file)
@@ -665,14 +665,15 @@ case "$host_os" in
 esac
 
 # try to work out how to produce PIC code with this compiler
-AC_PROG_CC_FLAG(fPIC)
-if test $ac_cv_prog_cc_fPIC = yes; then
-    PICFLAG="-fPIC";
+# We try -KPIC before -fPIC so that we handle UnixWare correctly.
+AC_PROG_CC_FLAG(KPIC)
+if test $ac_cv_prog_cc_KPIC = yes; then
+    PICFLAG="-KPIC";
 fi
 if test x$PICFLAG = x; then
-  AC_PROG_CC_FLAG(KPIC)
-  if test $ac_cv_prog_cc_KPIC = yes; then
-    PICFLAG="-KPIC";
+  AC_PROG_CC_FLAG(fPIC)
+  if test $ac_cv_prog_cc_fPIC = yes; then
+    PICFLAG="-fPIC";
   fi
 fi
 if test x$PICFLAG = x; then