ICONV_LOCATION=standard
-LOOK_DIRS="/usr /usr/local /sw"
+LOOK_DIRS="/usr /usr/local /sw /opt"
AC_ARG_WITH(libiconv,
[ --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) ],
[
])
ICONV_FOUND="no"
+libext=""
for i in $LOOK_DIRS ; do
save_LIBS=$LIBS
save_LDFLAGS=$LDFLAGS
CPPFLAGS="$CPPFLAGS -I$i/include"
dnl This is here to handle -withval stuff for --with-libiconv
dnl Perhaps we should always add a -L
- LDFLAGS="$LDFLAGS -L$i/lib"
- LIBS=
- export LDFLAGS LIBS CPPFLAGS
+
+dnl Check lib and lib32 library variants to cater for IRIX ABI-specific
+dnl installation paths.
+ for l in "lib" "lib32" ; do
+ LDFLAGS="$LDFLAGS -L$i/$l"
+ LIBS=
+ export LDFLAGS LIBS CPPFLAGS
dnl Try to find iconv(3)
- jm_ICONV($i)
+ jm_ICONV($i)
+ if test "$ICONV_FOUND" = yes; then
+ libext="$l"
+ break;
+ fi
+ done
if test "$ICONV_FOUND" = yes; then
LDFLAGS=$save_LDFLAGS
- LIB_ADD_DIR(LDFLAGS, "$i/lib")
+ LIB_ADD_DIR(LDFLAGS, "$i/$libext")
CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
LIBS="$save_LIBS"
ICONV_LOCATION=$i
fi
dnl Add the flags we need to CPPFLAGS and LDFLAGS
CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
- LIB_ADD_DIR(LDFLAGS, "$i/lib")
+ LIB_ADD_DIR(LDFLAGS, "$i/$libext")
export CPPFLAGS
AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv])
AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,$default_dos_charset,[Default dos charset name])
LIBS=$save_LIBS
export LDFLAGS LIBS CPPFLAGS
done
+unset libext
if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then
fi
-dictpath="/usr/lib/cracklib_dict"
-with_cracklib=yes
-###############################################
-# test for where we get FaciestCheck from
-AC_MSG_CHECKING(where to use cracklib from (default=$dictpath))
-AC_ARG_WITH(cracklib,
-[ --with-cracklib[=DIR] Look for cracklib dictionary in this location ],
-[ case "$withval" in
- yes)
- AC_MSG_RESULT(${dictpath})
- ;;
- no)
- AC_MSG_RESULT(no)
- dictpath=""
- ;;
- *)
- dictpath="$withval"
- AC_MSG_RESULT(${dictpath})
- ;;
- esac ],
- dictpath=""
- AC_MSG_RESULT(no)
-)
-
-if test x$dictpath != x""; then
- AC_SEARCH_LIBS(FascistCheck, [crack],
- [test "$ac_cv_search_crack" = "none required" || samba_cv_found_crack="yes"
- AC_DEFINE(HAVE_CRACK,1,[Whether the system has the FaciestCheck function from cracklib])])
-
- crack_saved_libs=$LIBS;
-
- if test x$samba_cv_found_crack=x"yes"; then
- AC_SEARCH_LIBS(CRACKLIB_DICTPATH, [crypt],
- AC_DEFINE(HAVE_CRACKLIB_DICTPATH, 1, [Whether we have given a CRACKLIB_DICTPATH in our headers])
- )
-
- AC_DEFINE_UNQUOTED(SAMBA_CRACKLIB_DICTPATH, "$dictpath", [Where the cracklib dictionay is])
- AC_MSG_CHECKING(Whether we have a working cracklib)
- AC_TRY_RUN([
- #include "${srcdir-.}/tests/crack.c"],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_WORKING_CRACKLIB,1,[Whether we have a working cracklib])
- AUTH_LIBS="-lcrack $AUTH_LIBS",
-
- AC_MSG_RESULT(no)
- AC_MSG_WARN(cracklib exists - but does not function correctly),
-
- AC_MSG_RESULT(no)
- AC_MSG_WARN(cannot test-run when cross-compiling)
- )
- else
- AC_MSG_CHECKING(Whether we have cracklib)
- AC_MSG_RESULT(no)
- fi
- LIBS=$crack_saved_libs
-fi
-
########################################################################################
##
## TESTS FOR SAM BACKENDS. KEEP THESE GROUPED TOGETHER
EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
- if test x"$BLDSHARED" = x"true"; then
+ if test $BLDSHARED = true; then
SHLIB_PROGS="$SHLIB_PROGS $WINBIND_NSS $WINBIND_WINS_NSS"
if test x"$with_pam" = x"yes"; then
for i in `echo $default_shared_modules | sed -e's/,/ /g'`
do
- dnl Fall back to static if dlopen() is not available
+ dnl Fall back to static if we cannot build shared libraries
eval MODULE_DEFAULT_$i=STATIC
- if test x"$ac_cv_func_dlopen" = xyes; then
+ if test $BLDSHARED = true; then
eval MODULE_DEFAULT_$i=SHARED
fi
done