]> granicus.if.org Git - libatomic_ops/commitdiff
Do not pass -fPIC to Cygwin gcc.
authorIvan Maidanski <ivmai@mail.ru>
Wed, 17 Aug 2011 17:39:25 +0000 (21:39 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 17 Aug 2011 17:39:25 +0000 (21:39 +0400)
* configure.ac (PICFLAG): Set to -fPIC if GCC but not Gygwin.

configure.ac

index 2a16a412dc9099175be3778b7be955c767cd1ef1..e51be8f78c94b88bcc1d77e903f668c503ff6534 100644 (file)
@@ -23,13 +23,20 @@ need_asm=false
 PICFLAG=
 AC_MSG_CHECKING(Determining PIC compiler flag)
 if test "$GCC" = yes; then
-  AC_MSG_RESULT(-fPIC)
-  PICFLAG=-fPIC
   case "$host" in
     *-*-solaris*)
+      AC_MSG_RESULT(-fPIC)
+      PICFLAG=-fPIC
       # Workaround: at least GCC 3.4.6 does not define this macro.
       CFLAGS="$CFLAGS -D__PIC__=1"
       ;;
+    *-*-cygwin*)
+      # Cygwin does not need -fPIC.
+      ;;
+    *)
+      AC_MSG_RESULT(-fPIC)
+      PICFLAG=-fPIC
+      ;;
   esac
   # Output all warnings.
   CFLAGS="$CFLAGS -Wall -Wextra"
@@ -82,12 +89,12 @@ AC_SUBST(THREADDLLIBS)
 AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
 
 AC_CONFIG_FILES([
-       Makefile
-       doc/Makefile
-       src/Makefile
-       tests/Makefile
-       pkgconfig/atomic_ops.pc
-       pkgconfig/atomic_ops-uninstalled.pc ])
+        Makefile
+        doc/Makefile
+        src/Makefile
+        tests/Makefile
+        pkgconfig/atomic_ops.pc
+        pkgconfig/atomic_ops-uninstalled.pc ])
 
 AC_CONFIG_COMMANDS([default],[[]],[[
 PICFLAG="${PICFLAG}"