diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-09-01 22:59:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-09-01 22:59:48 +0000 |
commit | bb12ec7ba1909f464d0091b31c18efadf239854a (patch) | |
tree | 567bb77c07b573b7f21ac715a26fc4bc919ac869 /acinclude.m4 | |
parent | 65c3e8d9bf8ad7db047dafcf23b421207d7ebcb1 (diff) |
Bert Driehuis' patch to add a "--with-ucdsnmp" option that specifies the
directory in which the UCD SNMP library is found (and to check for the
UCD SNMP stuff in "$prefix" if "$prefix" isn't "/usr/local"), and to
have "Makefile.am" use "$(MAKE)" rather than "make".
svn path=/trunk/; revision=624
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 0f275a92be..0587fb0c04 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -190,3 +190,45 @@ AC_DEFUN(AC_ETHEREAL_PCAP_CHECK, AC_CHECK_LIB(pcap, pcap_open_offline,, AC_MSG_ERROR(Library libpcap not found.)) ]) +# +# AC_ETHEREAL_UCDSNMP_CHECK +# +AC_DEFUN(AC_ETHEREAL_UCDSNMP_CHECK, +[ + want_ucdsnmp=yes + + AC_ARG_WITH(ucdsnmp, + --with-ucdsnmp=<directory> use UCD SNMP client library, [ + if test $withval = no + then + want_ucdsnmp=no + else + want_ucdsnmp=yes + ucdsnmp_user_dir=$withval + fi + ]) + + if test $want_ucdsnmp = yes + then + ucdsnmpdir="" + + for d in $ucdsnmp_user_dir $prefix + do + AC_MSG_CHECKING($d) + + if test x$d != x/usr/local && test -f $d/include/ucd-snmp/snmp.h + then + AC_MSG_RESULT(found ucd-snmp in $d) + ucdsnmpdir=$d + break + fi + done + + if test x$ucdsnmpdir != x + then + AC_MSG_RESULT(added $d to paths) + CFLAGS="$CFLAGS -I${ucdsnmpdir}/include/ucdsnmp" + LIBS="$LIBS -L${ucdsnmpdir}/lib" + fi + fi +]) |