diff options
-rw-r--r-- | source3/configure.in | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/configure.in b/source3/configure.in index 7c9bbf1bae..516104ffd7 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 |