summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-03-07 17:59:03 +0000
committerYang Tse <yangsita@gmail.com>2007-03-07 17:59:03 +0000
commitd8bc20eb43fc17f1c15f1b477cde4263c2e31227 (patch)
tree408c778a47e902185bf67f6b4d5f69ec79026269 /configure.ac
parent2077aa08599bc0087271d10d463f0518978d755f (diff)
downloadc-ares-d8bc20eb43fc17f1c15f1b477cde4263c2e31227.tar.gz
c-ares-d8bc20eb43fc17f1c15f1b477cde4263c2e31227.tar.bz2
c-ares-d8bc20eb43fc17f1c15f1b477cde4263c2e31227.zip
force libtool to build static libraries with PIC on AMD64
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 09eb4ea..d1905d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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