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