diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-22 12:19:18 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-22 12:19:18 +0000 |
commit | 0dde23a7b24edf1cbf4d7d7e5afea485e37498e5 (patch) | |
tree | 57d2881ccdb24a6217d0a85216a0447c0fb301d3 /source3/aclocal.m4 | |
parent | db94beaa41d6c2c82ee9351a171f2a73a9e358da (diff) | |
download | samba-0dde23a7b24edf1cbf4d7d7e5afea485e37498e5.tar.gz samba-0dde23a7b24edf1cbf4d7d7e5afea485e37498e5.tar.bz2 samba-0dde23a7b24edf1cbf4d7d7e5afea485e37498e5.zip |
Fixes from Paul Green and vorlon@debian.org for building shared libraries
(make it possible to build both shared and static) and -lcrypt handling.
(This used to be commit 30510f50077fd157664c127ac0182ce26843d43f)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r-- | source3/aclocal.m4 | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index 345be73aed..7bec88dd87 100644 --- a/source3/aclocal.m4 +++ b/source3/aclocal.m4 @@ -577,3 +577,67 @@ if test "$2" != "/usr/lib" ; then $1="$$1 -L$2" fi ]) + +dnl AC_ENABLE_SHARED - implement the --enable-shared flag +dnl Usage: AC_ENABLE_SHARED[(DEFAULT)] +dnl Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +dnl `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(shared, +changequote(<<, >>)dnl +<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case $enableval in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + + done + IFS="$ac_save_ifs" + ;; +esac], +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl +]) + +dnl AC_ENABLE_STATIC - implement the --enable-static flag +dnl Usage: AC_ENABLE_STATIC[(DEFAULT)] +dnl Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +dnl `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(static, +changequote(<<, >>)dnl +<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case $enableval in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl +]) + +dnl AC_DISABLE_STATIC - set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no)]) |