On Tuesday 29 May 2001 03:29 am, David Paschal wrote:
> Hi,
>
> I checked in a fix to the configure script that detects newer SNMP packages
> which need "-lcrypto" on the linker command line in addition to "-lsnmp".
> Joe, since this was a problem for you could you verify that configure and
> make work for you now? I can't accurately test this on my system at home
> since I don't have libcrypto, much less a libsnmp that requires it.
>
> It would probably be a good idea to run "make distclean", or at least
> delete the file "config.cache", before re-running the configure script.
>
> David
A simple "./configure" will now allow the package to build on my system, but
LIBSNMP_CMDLINE remains empty. Luckily I don't need it, but someone else may.
Here are some of the things I tried and the results:
]$ ./configure
creating cache ./config.cache
checking for user-mode parallel-port support... LINUX
checking for ability to include <sys/io.h> in C++ code... no
checking for user-mode USB support... LINUX
checking for snmp.h... /usr/include/ucd-snmp
checking for snmp_open in -lsnmp... no
checking for snmp_open in -lsnmp... (cached) no
checking for QT... /usr/local/qt
For some reason, the second "AC_CHECK_LIB(snmp,snmp_open,"
never gets executed, even after the first fails. At the end of configuration,
LIBSNMP_CMDLINE is empty. This is echoed to the console:
LIBRARY_CMDLINE = -L/home/joe/CVS/hpoj_copy/ptal -L/usr/local/qt/lib
LIBSNMP_CMDLINE =
QT_MOC = /usr/local/qt/bin/moc
****************************
When I replace the string "snmp_open" with "nonexistent_function" in the
first AC_CHECK_LIB (and run autoconf), it will fail and the second
AC_CHECK_LIB is then executed:
]$ ./configure
creating cache ./config.cache
checking for user-mode parallel-port support... LINUX
checking for ability to include <sys/io.h> in C++ code... no
checking for user-mode USB support... LINUX
checking for snmp.h... /usr/include/ucd-snmp
checking for nonexistent_function in -lsnmp... no
checking for snmp_open in -lsnmp... yes
checking for QT... /usr/local/qt
libcrypto is added in this case. This line is output near the end of
./configure:
LIBSNMP_CMDLINE = -lsnmp -lcrypto
*******************
When I replace the first "AC_CHECK_LIB(snmp,snmp_open," with
"AC_CHECK_LIB(ptal,main," configure reports:
checking for snmp.h... /usr/include/ucd-snmp
checking for main in -lptal... yes
checking for QT... /usr/local/qt
It then sets LIBSNMP_CMDLINE to:
LIBSNMP_CMDLINE = -lsnmp
--
Joe
|