forked from osmocom/wireshark
Do the tests for various extra "-L" and "-l" flags that might be needed
with "-lsnmp" in a loop; this fixes up the configure script's operation on Solaris. svn path=/trunk/; revision=8687
This commit is contained in:
parent
4fa26855a4
commit
00c3a29030
65
acinclude.m4
65
acinclude.m4
|
@ -2,7 +2,7 @@ dnl Macros that test for specific features.
|
|||
dnl This file is part of the Autoconf packaging for Ethereal.
|
||||
dnl Copyright (C) 1998-2000 by Gerald Combs.
|
||||
dnl
|
||||
dnl $Id: acinclude.m4,v 1.60 2003/10/10 21:13:21 guy Exp $
|
||||
dnl $Id: acinclude.m4,v 1.61 2003/10/14 07:36:39 guy Exp $
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
|
@ -541,44 +541,39 @@ AC_DEFUN(AC_ETHEREAL_UCDSNMP_CHECK,
|
|||
AC_CHECK_HEADER(ucd-snmp/ucd-snmp-config.h,
|
||||
[
|
||||
#
|
||||
# UCD SNMP may require "-lkstat" on Solaris, sigh.
|
||||
# UCD SNMP or Net-SNMP might require various helper
|
||||
# libraries on various platforms, such as "-ldes425"
|
||||
# in "/usr/kerberos/lib" on some versions of Red
|
||||
# Hat Linux, or "-lkstat" on Solaris.
|
||||
# XXX - it may also require "-lcrypto" on some platforms;
|
||||
# we should check for that as well, rather than requiring
|
||||
# users to explicitly indicate whether it's required.
|
||||
#
|
||||
AC_CHECK_LIB(snmp, sprint_realloc_objid,
|
||||
SNMP_LIBS=-lsnmp,
|
||||
[
|
||||
#
|
||||
# Throw away the cached "we didn't find it" answer.
|
||||
#
|
||||
unset ac_cv_lib_snmp_sprint_realloc_objid
|
||||
AC_CHECK_LIB(snmp, sprint_realloc_objid,
|
||||
SNMP_LIBS="-lsnmp -L/usr/kerberos/lib -ldes425",
|
||||
AC_CHECK_LIB(snmp, sprint_realloc_objid,
|
||||
[
|
||||
#
|
||||
# Throw away the cached "we found it" answer, so
|
||||
# that if we rerun "configure", we don't just blow
|
||||
# off this check and blithely assume that we don't
|
||||
# need "-lkstat".
|
||||
#
|
||||
# XXX - autoconf really needs a way to test for
|
||||
# a given routine in a given library *and* to test
|
||||
# whether additional "-L"/"-R"/whatever flags are
|
||||
# needed *before* the "-l" flag for the library
|
||||
# and to test whether additional libraries are
|
||||
# needed after the library *and* to cache all that
|
||||
# information.
|
||||
#
|
||||
unset ac_cv_lib_snmp_sprint_realloc_objid
|
||||
SNMP_LIBS="-lsnmp -lkstat"
|
||||
],,$SOCKET_LIBS $NSL_LIBS $SSL_LIBS -lkstat
|
||||
),
|
||||
$SOCKET_LIBS $NSL_LIBS $SSL_LIBS -L/usr/kerberos/lib -ldes425
|
||||
)
|
||||
], $SOCKET_LIBS $NSL_LIBS $SSL_LIBS
|
||||
)
|
||||
# XXX - autoconf really needs a way to test for
|
||||
# a given routine in a given library *and* to test
|
||||
# whether additional "-L"/"-R"/whatever flags are
|
||||
# needed *before* the "-l" flag for the library
|
||||
# and to test whether additional libraries are
|
||||
# needed after the library *and* to cache all that
|
||||
# information.
|
||||
#
|
||||
for extras in "" "-L/usr/kerberos/lib -ldes425" "-lkstat"
|
||||
do
|
||||
AC_CHECK_LIB(snmp, sprint_realloc_objid,
|
||||
[
|
||||
SNMP_LIBS="-lsnmp $extras"; break
|
||||
],
|
||||
[
|
||||
#
|
||||
# Throw away the cached "we didn't find it"
|
||||
# answer, so that if we rerun "configure",
|
||||
# we still do all these checks and don't
|
||||
# just blithely assume we don't need
|
||||
# the extra libraries.
|
||||
#
|
||||
unset ac_cv_lib_snmp_sprint_realloc_objid
|
||||
], $SOCKET_LIBS $NSL_LIBS $SSL_LIBS $extras)
|
||||
done
|
||||
|
||||
#
|
||||
# If we didn't find "sprint_realloc_objid()", fail.
|
||||
|
|
Loading…
Reference in New Issue