mirror of
https://github.com/znc/znc.git
synced 2026-08-08 18:03:22 +02:00
Poke around in configure.in
- use AC_ERROR instead of silently disabling features (so that one notices) - remove redundant check for dlopen - show a summary when configure finished git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@809 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -3353,7 +3353,9 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "Missing Required libc feature" && exit 1
|
||||
{ { echo "$as_me:$LINENO: error: Missing Required libc feature" >&5
|
||||
echo "$as_me: error: Missing Required libc feature" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -3450,82 +3452,6 @@ if test -z "$NOSSL"; then
|
||||
appendInc -I${OPENSSL}/include
|
||||
fi
|
||||
|
||||
if test -z "$NOCHECK_DL"; then
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
|
||||
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-ldl $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char dlopen ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return dlopen ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
ac_cv_lib_dl_dlopen=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_dl_dlopen=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
|
||||
if test $ac_cv_lib_dl_dlopen = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBDL 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-ldl $LIBS"
|
||||
|
||||
else
|
||||
MODULES="no"
|
||||
fi
|
||||
|
||||
NOCHECK_DL=1
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for BIO_new in -lcrypto" >&5
|
||||
echo $ECHO_N "checking for BIO_new in -lcrypto... $ECHO_C" >&6; }
|
||||
@@ -3596,7 +3522,9 @@ _ACEOF
|
||||
LIBS="-lcrypto $LIBS"
|
||||
|
||||
else
|
||||
NOSSL=1
|
||||
{ { echo "$as_me:$LINENO: error: Could not find libcrypto. Try --disable-openssl" >&5
|
||||
echo "$as_me: error: Could not find libcrypto. Try --disable-openssl" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
|
||||
@@ -3669,7 +3597,9 @@ _ACEOF
|
||||
LIBS="-lssl $LIBS"
|
||||
|
||||
else
|
||||
NOSSL=1
|
||||
{ { echo "$as_me:$LINENO: error: Could not find libssl. Try --disable-openssl" >&5
|
||||
echo "$as_me: error: Could not find libssl. Try --disable-openssl" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
|
||||
@@ -3763,9 +3693,12 @@ _ACEOF
|
||||
LIBS="-ldl $LIBS"
|
||||
|
||||
else
|
||||
MODULES="no"
|
||||
{ { echo "$as_me:$LINENO: error: Could not find dlopen. Try --disable-modules" >&5
|
||||
echo "$as_me: error: Could not find dlopen. Try --disable-modules" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
NOCHECK_DL=1
|
||||
fi
|
||||
if test "$MODULES" = "yes"; then
|
||||
appendCXX -D_MODULES
|
||||
@@ -3855,12 +3788,17 @@ echo "${ECHO_T}$ac_cv_lib_perl_perl_alloc" >&6; }
|
||||
if test $ac_cv_lib_perl_perl_alloc = yes; then
|
||||
unset NOPERL
|
||||
else
|
||||
unset PERL
|
||||
{ { echo "$as_me:$LINENO: error: Could not find liberl. Try --disable-perl" >&5
|
||||
echo "$as_me: error: Could not find liberl. Try --disable-perl" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
else
|
||||
echo "no"
|
||||
unset PERL
|
||||
{ { echo "$as_me:$LINENO: error: Could not find perl binary. Try --disable-perl" >&5
|
||||
echo "$as_me: error: Could not find perl binary. Try --disable-perl" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -4913,3 +4851,21 @@ if test "$no_create" != yes; then
|
||||
$ac_cs_success || { (exit 1); exit 1; }
|
||||
fi
|
||||
|
||||
|
||||
echo
|
||||
echo znc $VERSION configured
|
||||
echo
|
||||
echo "debug: $DEBUG"
|
||||
echo "ipv6: $IPV6"
|
||||
if test x"$NOSSL" = "x1" ; then
|
||||
echo "openssl: no"
|
||||
else
|
||||
echo "openssl: yes"
|
||||
fi
|
||||
echo modules: $MODULES
|
||||
if test x"$PERL" = "x" ; then
|
||||
echo "perl: no"
|
||||
else
|
||||
echo "perl: yes"
|
||||
fi
|
||||
|
||||
|
||||
+27
-9
@@ -94,7 +94,7 @@ if test "$IPV6" != "no"; then
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB( gnugetopt, getopt_long,)
|
||||
AC_CHECK_FUNCS( stat lstat chmod open, , echo "Missing Required libc feature" && exit 1)
|
||||
AC_CHECK_FUNCS( stat lstat chmod open, , AC_ERROR([Missing Required libc feature]))
|
||||
if test "$MODULES" = "yes"; then
|
||||
AC_CHECK_FUNC( dlopen,NOCHECK_DL=1,)
|
||||
fi
|
||||
@@ -104,12 +104,8 @@ if test -z "$NOSSL"; then
|
||||
appendInc -I${OPENSSL}/include
|
||||
fi
|
||||
|
||||
if test -z "$NOCHECK_DL"; then
|
||||
AC_CHECK_LIB( dl, dlopen,,MODULES="no",)
|
||||
NOCHECK_DL=1
|
||||
fi
|
||||
AC_CHECK_LIB( crypto, BIO_new,,NOSSL=1, )
|
||||
AC_CHECK_LIB( ssl, SSL_shutdown,,NOSSL=1, )
|
||||
AC_CHECK_LIB( crypto, BIO_new,,AC_ERROR([Could not find libcrypto. Try --disable-openssl]), )
|
||||
AC_CHECK_LIB( ssl, SSL_shutdown,,AC_ERROR([Could not find libssl. Try --disable-openssl]), )
|
||||
|
||||
if test -z "$NOSSL"; then
|
||||
appendCXX -DHAVE_LIBSSL
|
||||
@@ -127,7 +123,8 @@ AC_ARG_WITH( [module-prefix],
|
||||
|
||||
if test "$MODULES" = "yes"; then
|
||||
if test -z "$NOCHECK_DL"; then
|
||||
AC_CHECK_LIB( dl, dlopen,,MODULES="no",)
|
||||
AC_CHECK_LIB( dl, dlopen,, AC_ERROR([Could not find dlopen. Try --disable-modules]))
|
||||
NOCHECK_DL=1
|
||||
fi
|
||||
if test "$MODULES" = "yes"; then
|
||||
appendCXX -D_MODULES
|
||||
@@ -153,10 +150,13 @@ if test "$MODULES" = "yes"; then
|
||||
PERL=`which perl`
|
||||
if test -n "$PERL"; then
|
||||
echo "$PERL"
|
||||
AC_CHECK_LIB( perl, perl_alloc,unset NOPERL, unset PERL,[`$PERL -MExtUtils::Embed -e ccopts -e ldopts`])
|
||||
AC_CHECK_LIB(perl, perl_alloc,unset NOPERL,
|
||||
AC_ERROR([Could not find liberl. Try --disable-perl]),
|
||||
[`$PERL -MExtUtils::Embed -e ccopts -e ldopts`])
|
||||
else
|
||||
echo "no"
|
||||
unset PERL
|
||||
AC_ERROR([Could not find perl binary. Try --disable-perl])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -183,3 +183,21 @@ if test "$MODULES" = "yes"; then
|
||||
AC_CONFIG_FILES([modules/Makefile])
|
||||
fi
|
||||
AC_OUTPUT
|
||||
|
||||
echo
|
||||
echo znc $VERSION configured
|
||||
echo
|
||||
echo "debug: $DEBUG"
|
||||
echo "ipv6: $IPV6"
|
||||
if test x"$NOSSL" = "x1" ; then
|
||||
echo "openssl: no"
|
||||
else
|
||||
echo "openssl: yes"
|
||||
fi
|
||||
echo modules: $MODULES
|
||||
if test x"$PERL" = "x" ; then
|
||||
echo "perl: no"
|
||||
else
|
||||
echo "perl: yes"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user