summaryrefslogtreecommitdiff
path: root/source3/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
commit7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9 (patch)
treea1a49b3c0cedb1f5f0b6b8b500ba29a990d57640 /source3/aclocal.m4
parent4750ce1760a39100f71e74ce8b88a925fef4c42f (diff)
downloadsamba-7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9.tar.gz
samba-7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9.tar.bz2
samba-7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9.zip
auto-detect the right flag for the compiler to produce PIC code
(This used to be commit 5d92e003978f02e53c0886508ccefc8c24ec1bbf)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r--source3/aclocal.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index e2f012848c..e97084e9ac 100644
--- a/source3/aclocal.m4
+++ b/source3/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*
+])])