]> granicus.if.org Git - curl/commitdiff
force libtool to build static libraries with PIC on AMD64
authorYang Tse <yangsita@gmail.com>
Wed, 7 Mar 2007 17:59:03 +0000 (17:59 +0000)
committerYang Tse <yangsita@gmail.com>
Wed, 7 Mar 2007 17:59:03 +0000 (17:59 +0000)
ares/configure.ac
configure.ac

index 09eb4eae9c20c22ae59d710b27e0b3f662552bb1..d1905d264371598bcf0ba5402f4e0c5634f52725 100644 (file)
@@ -7,6 +7,14 @@ AM_CONFIG_HEADER(config.h)
 AM_MAINTAINER_MODE
 AM_INIT_AUTOMAKE(c-ares, CVS)
 
+dnl
+dnl Detect the canonical host and target build environment
+dnl
+
+AC_CANONICAL_HOST
+dnl Get system canonical name
+AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
+
 AC_AIX
 AC_PROG_CC
 AC_PROG_INSTALL
@@ -75,6 +83,18 @@ m4_defun([AC_LIBTOOL_CXX],[])
 m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
 m4_defun([AC_LIBTOOL_F77],[])
 
+dnl force libtool to build static libraries with PIC on AMD64
+AC_MSG_CHECKING([if target is AMD64 (to build static libraries with PIC)])
+case $host in
+  x86_64*linux* | *-*-cygwin)
+    AC_MSG_RESULT([yes])
+    with_pic=yes
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+esac
+
 dnl libtool setup
 AC_PROG_LIBTOOL
 
index d54dd2fc52e0f2a1ca6a494ae8b8a2bc63c2365b..5bcbce4fb07f37a4eef96b5acb72204005c72d5f 100644 (file)
@@ -127,6 +127,18 @@ m4_defun([AC_LIBTOOL_CXX],[])
 m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
 m4_defun([AC_LIBTOOL_F77],[])
 
+dnl force libtool to build static libraries with PIC on AMD64
+AC_MSG_CHECKING([if target is AMD64 (to build static libraries with PIC)])
+case $host in
+  x86_64*linux* | *-*-cygwin)
+    AC_MSG_RESULT([yes])
+    with_pic=yes
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+esac
+
 dnl libtool setup
 AC_PROG_LIBTOOL