Jan Satko schrieb: > > "-lssl -lcrypto -L_OpenSSL_Lib_Directory -lssl > -lcrypto" > > which fails with "library -lssl: not found". I'm > lost... > > I think problem is with "-L_OpenSSL_Lib_Directory". It > doesn't matter > if -l is before -L.
Yes and no. Apparently, it does not matter, when linking executables (at least the configure tests do succeed with -lssl -L/usr/local/openssl/lib -lcrypto), but it _does_ matter when linking shared objects, where it complains that it cannot find -lssl when arguments are given in that order, while everything works if I manually call it with -L/usr/local/openssl/lib -lssl -lcrypto. I now got everything to compile by - first modifying aclocal.m4 to preprend new libraries (so I get working "-lssl -lcrypto" instead of broken "-lcrypto -lssl", unfortunately, the -Lsomething is placed wrongly, though) - see below. - regenerating all configure scripts. - Calling LDFLAGS=-L/usr/local/openssl/lib ./configure \ --with-openssl-includes=/usr/local/openssl/include \ --with-openssl-libraries=/usr/local/openssl/lib [ Note: No, it does _not_ work without the LDFLAGS= ...] - Adding $(LDFLAGS) to two or three Makefiles where it was missing, so gcc again did choke on -lssl -L/usr/local/openssl/lib -lcrypto Not exactly an easy build, but now it seems to be working. Regards, Stefan P.S.: Just for the record, here's my patch to aclocal.m4 that I used: --- aclocal.m4.old Sat Oct 4 02:15:42 2003 +++ aclocal.m4 Tue Aug 10 11:32:26 2004 @@ -4037,7 +4037,7 @@ dnl # Try to link it first, using the default libs && library paths dnl # old_LIBS="$LIBS" - LIBS="$LIBS -l$1" + LIBS="-l$1 $LIBS" AC_TRY_LINK([extern char $2();], [ $2()], smart_lib="-l$1") @@ -4047,8 +4047,7 @@ AC_LOCATE_DIR(smart_lib_dir,[lib$1.a]) for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do - LIBS="$old_LIBS -L$try -l$1" - + LIBS="-L$try -l$1 $old_LIBS" AC_TRY_LINK([extern char $2();], [ $2()], smart_lib="-L$try -l$1") @@ -4065,8 +4064,8 @@ if test "x$smart_lib" != "x"; then AC_MSG_RESULT(yes) eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes" - LIBS="$old_LIBS $smart_lib" - SMART_LIBS="$SMART_LIBS $smart_lib" + LIBS="$smart_lib $old_LIBS" + SMART_LIBS="$smart_lib $SMART_LIBS" else AC_MSG_RESULT(no) fi - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html