File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / snmp / config.m4
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:01 2013 UTC (10 years, 11 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

    1: dnl
    2: dnl $Id: config.m4,v 1.1.1.3 2013/07/22 01:32:01 misho Exp $
    3: dnl
    4: 
    5: PHP_ARG_WITH(snmp,for SNMP support,
    6: [  --with-snmp[=DIR]       Include SNMP support])
    7: 
    8: PHP_ARG_WITH(openssl-dir,OpenSSL dir for SNMP,
    9: [  --with-openssl-dir[=DIR]  SNMP: openssl install prefix], no, no)
   10: 
   11: if test "$PHP_SNMP" != "no"; then
   12: 
   13:   if test "$PHP_SNMP" = "yes"; then
   14:     AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH])
   15:   else
   16:     SNMP_CONFIG="$PHP_SNMP/bin/net-snmp-config"
   17:   fi
   18: 
   19:   if test -x "$SNMP_CONFIG"; then
   20:     SNMP_LIBS=`$SNMP_CONFIG --netsnmp-libs`
   21:     SNMP_LIBS="$SNMP_LIBS `$SNMP_CONFIG --external-libs`"
   22:     SNMP_PREFIX=`$SNMP_CONFIG --prefix`
   23:     snmp_full_version=`$SNMP_CONFIG --version`
   24:     ac_IFS=$IFS
   25:     IFS="."
   26:     set $snmp_full_version
   27:     IFS=$ac_IFS
   28:     SNMP_VERSION=`expr [$]1 \* 1000 + [$]2`
   29:     if test "$SNMP_VERSION" -ge "5003"; then
   30:       if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
   31:         PHP_ADD_INCLUDE(${SNMP_PREFIX}/include)
   32:         PHP_EVAL_LIBLINE($SNMP_LIBS, SNMP_SHARED_LIBADD)
   33:         SNMP_LIBNAME=netsnmp
   34:       else
   35:         AC_MSG_ERROR([Could not find the required paths. Please check your net-snmp installation.])
   36:       fi
   37:     else
   38:       AC_MSG_ERROR([Net-SNMP version 5.3 or greater reqired (detected $snmp_full_version).])
   39:     fi
   40:   else 
   41:     AC_MSG_ERROR([Could not find net-snmp-config binary. Please check your net-snmp installation.])
   42:   fi
   43: 
   44:   dnl Test build.
   45:   PHP_CHECK_LIBRARY($SNMP_LIBNAME, init_snmp,
   46:   [
   47:     AC_DEFINE(HAVE_SNMP,1,[ ])
   48:   ], [
   49:     AC_MSG_ERROR([SNMP sanity check failed. Please check config.log for more information.])
   50:   ], [
   51:     $SNMP_SHARED_LIBADD
   52:   ])
   53: 
   54:   dnl Check whether shutdown_snmp_logging() exists.
   55:   PHP_CHECK_LIBRARY($SNMP_LIBNAME, shutdown_snmp_logging,
   56:   [
   57:     AC_DEFINE(HAVE_SHUTDOWN_SNMP_LOGGING, 1, [ ])
   58:   ], [], [
   59:     $SNMP_SHARED_LIBADD
   60:   ])
   61: 
   62:   PHP_NEW_EXTENSION(snmp, snmp.c, $ext_shared)
   63:   PHP_SUBST(SNMP_SHARED_LIBADD)
   64: fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>