Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if libdl and libz are really needed #631

Open
pabuhler opened this issue Dec 16, 2022 · 1 comment
Open

check if libdl and libz are really needed #631

pabuhler opened this issue Dec 16, 2022 · 1 comment

Comments

@pabuhler
Copy link
Member

    In this case |I found that it was mileading mesage. If you will look closet on the bottom openssl detection

libsrtp/configure.ac

Lines 208 to 256 in cc362ae

AC_ARG_ENABLE([openssl],
[AS_HELP_STRING([--enable-openssl], [compile in OpenSSL crypto engine])],
[], [enable_openssl=no])
AC_MSG_RESULT([$enable_openssl])
AC_MSG_CHECKING([whether to leverage NSS crypto])
AC_ARG_ENABLE([nss],
[AS_HELP_STRING([--enable-nss], [compile in NSS crypto engine])],
[], [enable_nss=no])
AC_MSG_RESULT([$enable_nss])
if test "$enable_openssl" = "yes"; then
AC_MSG_CHECKING([for user specified OpenSSL directory])
AC_ARG_WITH([openssl-dir],
[AS_HELP_STRING([--with-openssl-dir], [Location of OpenSSL installation])],
[if test "x$PKG_CONFIG" != "x" && test -f $with_openssl_dir/lib/pkgconfig/libcrypto.pc; then
if test "x$PKG_CONFIG_PATH" = "x"; then
export PKG_CONFIG_PATH="$with_openssl_dir/lib/pkgconfig"
else
export PKG_CONFIG_PATH="$with_openssl_dir/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
AC_MSG_RESULT([$with_openssl_dir])
elif test -d $with_openssl_dir/lib; then
CFLAGS="$CFLAGS -I$with_openssl_dir/include"
if test "x$LDFLAGS" = "x"; then
LDFLAGS="-L$with_openssl_dir/lib"
else
LDFLAGS="$LDFLAGS -L$with_openssl_dir/lib"
fi
AC_MSG_RESULT([$with_openssl_dir])
else
AC_MSG_RESULT([invalid])
AC_MSG_FAILURE([Invalid OpenSSL location: $with_openssl_dir])
fi],
[AC_MSG_RESULT([no])])
if test "x$PKG_CONFIG" != "x"; then
PKG_CHECK_MODULES([crypto], [libcrypto >= 1.0.2i],
[CFLAGS="$CFLAGS $crypto_CFLAGS"
LIBS="$crypto_LIBS $LIBS"
openssl_cleanse_broken=no],
[PKG_CHECK_MODULES([crypto], [libcrypto >= 1.0.1],
[CFLAGS="$CFLAGS $crypto_CFLAGS"
LIBS="$crypto_LIBS $LIBS"
openssl_cleanse_broken=maybe])])
else
AC_CHECK_LIB([dl], [dlopen], [], [AC_MSG_WARN([can't find libdl])])
AC_CHECK_LIB([z], [inflate], [], [AC_MSG_WARN([can't find libz])])
fi

you can fiund libdl and libz detections.
I had no installed libz devel resources and that message was printed by incorrecvt logic in tjhat section
Looks like libz detection can be removed because nothing in source tree is usimg libz.

[tkloczko@devel-g2v libsrtp-2.4.2]$ grep zlib.h -r
[tkloczko@devel-g2v libsrtp-2.4.2]$

Whole section could be dramatically reduced if PKG_CHECK_MODULES() aclocal macro would be used.

Originally posted by @kloczek in #599 (comment)

@pabuhler
Copy link
Member Author

Follow up on @kloczek 's comments in #599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant