diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-08 04:52:11 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-08 04:52:11 +0000 |
commit | 7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9 (patch) | |
tree | a1a49b3c0cedb1f5f0b6b8b500ba29a990d57640 /source3/aclocal.m4 | |
parent | 4750ce1760a39100f71e74ce8b88a925fef4c42f (diff) | |
download | samba-7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9.tar.gz samba-7e5f267ee9baf3f25bf9b5d8af949f12f1ffbde9.tar.xz 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.m4 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index e2f012848c8..e97084e9ac8 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* +])]) |