summaryrefslogtreecommitdiffstats
path: root/source/aclocal.m4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-08 04:52:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-08 04:52:11 +0000
commit5d92e003978f02e53c0886508ccefc8c24ec1bbf (patch)
tree7737c2a0183f3a20ff0f05a08b8fa52063cc128f /source/aclocal.m4
parent349469221a84658048790d7567b4fcea43c0b759 (diff)
downloadsamba-5d92e003978f02e53c0886508ccefc8c24ec1bbf.tar.gz
samba-5d92e003978f02e53c0886508ccefc8c24ec1bbf.tar.xz
samba-5d92e003978f02e53c0886508ccefc8c24ec1bbf.zip
auto-detect the right flag for the compiler to produce PIC code
Diffstat (limited to 'source/aclocal.m4')
-rw-r--r--source/aclocal.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/source/aclocal.m4 b/source/aclocal.m4
index e2f012848c8..e97084e9ac8 100644
--- a/source/aclocal.m4
+++ b/source/aclocal.m4
@@ -48,3 +48,16 @@ if test $ac_cv_dirent_d_off = yes; then
AC_DEFINE(HAVE_DIRENT_D_OFF)
fi
])
+
+
+dnl AC_PROG_CC_FLAG(flag)
+AC_DEFUN(AC_PROG_CC_FLAG,
+[AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1,
+[echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_$1=yes
+else
+ ac_cv_prog_cc_$1=no
+fi
+rm -f conftest*
+])])