Merge branch 'st/python'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 8 Dec 2009 12:28:10 +0000 (13:28 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 8 Dec 2009 12:28:10 +0000 (13:28 +0100)
1  2 
configure.in

diff --combined configure.in
@@@ -1591,7 -1591,7 +1591,7 @@@ the
        if test -d "$with_java_home"
        then
                AC_MSG_CHECKING([for jni.h])
 -              TMPDIR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
 +              TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
                if test "x$TMPDIR" != "x"
                then
                        AC_MSG_RESULT([found in $TMPDIR])
                fi
  
                AC_MSG_CHECKING([for jni_md.h])
 -              TMPDIR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
 +              TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
                if test "x$TMPDIR" != "x"
                then
                        AC_MSG_RESULT([found in $TMPDIR])
                fi
  
                AC_MSG_CHECKING([for libjvm.so])
 -              TMPDIR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
 +              TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
                if test "x$TMPDIR" != "x"
                then
                        AC_MSG_RESULT([found in $TMPDIR])
                if test "x$JAVAC" = "x"
                then
                        AC_MSG_CHECKING([for javac])
 -                      TMPDIR=`find -L "$with_java_home" -name javac -type f | head -n 1`
 +                      TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
                        if test "x$TMPDIR" != "x"
                        then
                                JAVAC="$TMPDIR"
@@@ -1993,7 -1993,7 +1993,7 @@@ the
  
        if test "x$LIBNETAPP_LIBS" = "x"
        then
 -              LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm"
 +              LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
        fi
        AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
  
@@@ -2698,12 -2698,12 +2698,12 @@@ PATH="$SAVE_PATH
  if test "x$with_python" = "xyes"
  then
        AC_MSG_CHECKING([for Python CPPFLAGS])
-       python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>/dev/null`
+       python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>&1`
        python_config_status=$?
  
        if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
        then
-               AC_MSG_RESULT([failed with status $python_config_status])
+               AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)])
                with_python="no"
        else
                AC_MSG_RESULT([$python_include_path])
@@@ -2718,7 -2718,7 +2718,7 @@@ the
  
        if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
        then
-               AC_MSG_RESULT([failed with status $python_config_status])
+               AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)])
                with_python="no"
        else
                AC_MSG_RESULT([$python_library_path])
@@@ -2733,7 -2733,7 +2733,7 @@@ the
  
        if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
        then
-               AC_MSG_RESULT([failed with status $python_config_status])
+               AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)])
                with_python="no"
        else
                AC_MSG_RESULT([$python_library_flags])
  fi
  # }}} --with-python
  
 +# --with-librouteros {{{
 +AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
 +[
 + if test "x$withval" = "xyes"
 + then
 +       with_librouteros="yes"
 + else if test "x$withval" = "xno"
 + then
 +       with_librouteros="no"
 + else
 +       with_librouteros="yes"
 +       LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS -I$withval/include"
 +       LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS -L$withval/lib"
 + fi; fi
 +],
 +[with_librouteros="yes"])
 +
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +SAVE_LDFLAGS="$LDFLAGS"
 +
 +CPPFLAGS="$CPPFLAGS $LIBROUTEROS_CPPFLAGS"
 +LDFLAGS="$LDFLAGS $LIBROUTEROS_LDFLAGS"
 +
 +if test "x$with_librouteros" = "xyes"
 +then
 +      if test "x$LIBROUTEROS_CPPFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([librouteros CPPFLAGS: $LIBROUTEROS_CPPFLAGS])
 +      fi
 +      AC_CHECK_HEADERS(routeros_api.h,
 +      [with_librouteros="yes"],
 +      [with_librouteros="no ('routeros_api.h' not found)"])
 +fi
 +if test "x$with_librouteros" = "xyes"
 +then
 +      if test "x$LIBROUTEROS_LDFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([librouteros LDFLAGS: $LIBROUTEROS_LDFLAGS])
 +      fi
 +      AC_CHECK_LIB(routeros, ros_interface,
 +      [with_librouteros="yes"],
 +      [with_librouteros="no (symbol 'ros_interface' not found)"])
 +fi
 +
 +CPPFLAGS="$SAVE_CPPFLAGS"
 +LDFLAGS="$SAVE_LDFLAGS"
 +
 +if test "x$with_librouteros" = "xyes"
 +then
 +      BUILD_WITH_LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS"
 +      BUILD_WITH_LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS"
 +      AC_SUBST(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBROUTEROS_LDFLAGS)
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBROUTEROS, test "x$with_librouteros" = "xyes")
 +# }}}
 +
  # --with-librrd {{{
  # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
  librrd_cflags=""
@@@ -3722,7 -3665,6 +3722,7 @@@ plugin_ascent="no
  plugin_battery="no"
  plugin_bind="no"
  plugin_conntrack="no"
 +plugin_contextswitch="no"
  plugin_cpu="no"
  plugin_cpufreq="no"
  plugin_curl_json="no"
@@@ -3760,7 -3702,6 +3760,7 @@@ if test "x$ac_system" = "xLinux
  then
        plugin_battery="yes"
        plugin_conntrack="yes"
 +      plugin_contextswitch="yes"
        plugin_cpu="yes"
        plugin_cpufreq="yes"
        plugin_disk="yes"
@@@ -3996,7 -3937,6 +3996,7 @@@ AC_PLUGIN([ascent],      [$plugin_ascen
  AC_PLUGIN([battery],     [$plugin_battery],    [Battery statistics])
  AC_PLUGIN([bind],        [$plugin_bind],       [ISC Bind nameserver statistics])
  AC_PLUGIN([conntrack],   [$plugin_conntrack],  [nf_conntrack statistics])
 +AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
  AC_PLUGIN([cpufreq],     [$plugin_cpufreq],    [CPU frequency statistics])
  AC_PLUGIN([cpu],         [$plugin_cpu],        [CPU usage statistics])
  AC_PLUGIN([csv],         [yes],                [CSV output plugin])
@@@ -4024,7 -3964,6 +4024,7 @@@ AC_PLUGIN([load],        [$plugin_load]
  AC_PLUGIN([logfile],     [yes],                [File logging plugin])
  AC_PLUGIN([madwifi],     [$have_linux_wireless_h], [Madwifi wireless statistics])
  AC_PLUGIN([match_empty_counter], [yes],        [The empty counter match])
 +AC_PLUGIN([match_hashed], [yes],               [The hashed match])
  AC_PLUGIN([match_regex], [yes],                [The regex match])
  AC_PLUGIN([match_timediff], [yes],             [The timediff match])
  AC_PLUGIN([match_value], [yes],                [The value match])
@@@ -4054,7 -3993,6 +4054,7 @@@ AC_PLUGIN([powerdns],    [yes]
  AC_PLUGIN([processes],   [$plugin_processes],  [Process statistics])
  AC_PLUGIN([protocols],   [$plugin_protocols],  [Protocol (IP, TCP, ...) statistics])
  AC_PLUGIN([python],      [$with_python],       [Embed a Python interpreter])
 +AC_PLUGIN([routeros],    [$with_librouteros],  [RouterOS plugin])
  AC_PLUGIN([rrdcached],   [$librrd_rrdc_update], [RRDTool output plugin])
  AC_PLUGIN([rrdtool],     [$with_librrd],       [RRDTool output plugin])
  AC_PLUGIN([sensors],     [$with_libsensors],   [lm_sensors statistics])
@@@ -4277,7 -4215,6 +4277,7 @@@ Configuration
      libperl . . . . . . . $with_libperl
      libpq . . . . . . . . $with_libpq
      libpthread  . . . . . $with_libpthread
 +    librouteros . . . . . $with_librouteros
      librrd  . . . . . . . $with_librrd
      libsensors  . . . . . $with_libsensors
      libstatgrab . . . . . $with_libstatgrab
      battery . . . . . . . $enable_battery
      bind  . . . . . . . . $enable_bind
      conntrack . . . . . . $enable_conntrack
 +    contextswitch . . . . $enable_contextswitch
      cpu . . . . . . . . . $enable_cpu
      cpufreq . . . . . . . $enable_cpufreq
      csv . . . . . . . . . $enable_csv
      logfile . . . . . . . $enable_logfile
      madwifi . . . . . . . $enable_madwifi
      match_empty_counter . $enable_match_empty_counter
 +    match_hashed  . . . . $enable_match_hashed
      match_regex . . . . . $enable_match_regex
      match_timediff  . . . $enable_match_timediff
      match_value . . . . . $enable_match_value
      processes . . . . . . $enable_processes
      protocols . . . . . . $enable_protocols
      python  . . . . . . . $enable_python
 +    routeros  . . . . . . $enable_routeros
      rrdcached . . . . . . $enable_rrdcached
      rrdtool . . . . . . . $enable_rrdtool
      sensors . . . . . . . $enable_sensors