*.pyc
# Python api generator
-/vpp-api/python/build
-/vpp-api/python/dist
-/vpp-api/python/vpp_papi.egg-info
-/vpp-api/python/vpp_papi/memclnt.py
-/vpp-api/python/vpp_papi/vpe.py
+/src/vpp-api/python/build
+/src/vpp-api/python/dist
+/src/vpp-api/python/vpp_papi.egg-info
+/src/vpp-api/python/vpp_papi/memclnt.py
+/src/vpp-api/python/vpp_papi/vpe.py
# Build files in the test directory
/test/*.ok
.PHONY: help bootstrap wipe wipe-release build build-release rebuild rebuild-release
.PHONY: run run-release debug debug-release build-vat run-vat pkg-deb pkg-rpm
-.PHONY: ctags cscope plugins plugins-release build-vpp-api
+.PHONY: ctags cscope
.PHONY: test test-debug retest retest-debug test-doc test-wipe-doc test-help test-wipe
.PHONY: test-cov test-wipe-cov
@echo " wipe-release - wipe all products of release build "
@echo " build - build debug binaries"
@echo " build-release - build release binaries"
- @echo " plugins - build debug plugin binaries"
- @echo " plugins-release - build release plugin binaries"
@echo " rebuild - wipe and build debug binares"
@echo " rebuild-release - wipe and build release binares"
@echo " run - run debug binary"
@echo " retest - run functional tests"
@echo " retest-debug - run functional tests (debug build)"
@echo " test-help - show help on test framework"
- @echo " build-vat - build vpp-api-test tool"
- @echo " build-vpp-api - build vpp-api"
@echo " run-vat - run vpp-api-test tool"
@echo " pkg-deb - build DEB packages"
@echo " pkg-rpm - build RPM packages"
rebuild-release: wipe-release build-release
-plugins: $(BR)/.bootstrap.ok
- $(call make,$(PLATFORM)_debug,plugins-install)
-
-plugins-release: $(BR)/.bootstrap.ok
- $(call make,$(PLATFORM),plugins-install)
-
-build-vpp-api: $(BR)/.bootstrap.ok
- $(call make,$(PLATFORM)_debug,vpp-api-install)
-
VPP_PYTHON_PREFIX=$(BR)/python
define test
- $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-api-install plugins-install vpp-install,)
+ $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
make -C test \
BR=$(BR) \
VPP_TEST_BUILD_DIR=$(BR)/build-$(2)-native \
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
@echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
@cd $(STARTUP_DIR) && \
- sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/plugins/lib64/vpp_plugins
+ sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/vpp/lib64/vpp_plugins
endef
else
define run
@cd $(STARTUP_DIR) && \
- sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/plugins/lib64/vpp_plugins
+ sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/vpp/lib64/vpp_plugins
endef
endif
+++ /dev/null
-plugins_configure_depend = \
- vpp-api-install \
- vpp-install
-
-plugins_CPPFLAGS = $(call installed_includes_fn, \
- vpp \
- vpp-api)
-
-plugins_LDFLAGS = $(call installed_libs_fn, \
- vpp)
-
-ifeq ($($(PLATFORM)_enable_tests),yes)
-plugins_configure_args += --enable-tests
-endif
-
-# Platform dependent configure flags
-plugins_configure_args += $(plugins_configure_args_$(PLATFORM))
-
-# include & link with openssl only if needed
-ifneq ($($(PLATFORM)_uses_openssl),no)
-plugins_CPPFLAGS += $(call installed_includes_fn, openssl)
-plugins_LDFLAGS += $(call installed_libs_fn, openssl)
-endif
-
-ifneq ($($(PLATFORM)_uses_dpdk),no)
-ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
-plugins_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
-plugins_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
-else
-plugins_configure_depend += dpdk-install
-plugins_CPPFLAGS += $(call installed_includes_fn, dpdk)
-plugins_LDFLAGS += $(call installed_libs_fn, dpdk)
-endif
-endif
+++ /dev/null
-vnet_configure_depend = \
- vppinfra-install \
- svm-install \
- vlib-api-install \
- vlib-install
-
-vnet_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api)
-
-vnet_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api)
-
-ifeq ($($(PLATFORM)_enable_tests),yes)
-vnet_configure_args += --enable-tests
-endif
-
-# Platform dependent configure flags
-vnet_configure_args += $(vnet_configure_args_$(PLATFORM))
-
-# include & link with openssl only if needed
-ifneq ($($(PLATFORM)_uses_openssl),no)
-vnet_CPPFLAGS += $(call installed_includes_fn, openssl)
-vnet_LDFLAGS += $(call installed_libs_fn, openssl)
-endif
-
-ifneq ($($(PLATFORM)_uses_dpdk),no)
-ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
-vnet_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
-vnet_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
-else
-vnet_configure_depend += dpdk-install
-vnet_CPPFLAGS += $(call installed_includes_fn, dpdk)
-vnet_LDFLAGS += $(call installed_libs_fn, dpdk)
-endif
-ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
-vnet_configure_args += --with-dpdk-crypto
-endif
-ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
-vnet_configure_args += --with-dpdk-mlx5-pmd
-endif
-endif
+++ /dev/null
-vpp-api_configure_depend = \
- vpp-install
-
-vpp-api_CPPFLAGS = $(call installed_includes_fn, \
- vpp)
-
-vpp-api_LDFLAGS =
-
-vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-8-openjdk-amd64/include
\
: generate file manifests ; \
find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
- | sed -e 's:.*:../& /usr/bin:' \
+ | sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
> deb/debian/vpp.install ; \
\
: core api definitions ; \
./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-plugins.install ; \
\
- : python-api package ; \
- ./scripts/find-python-api-contents $(INSTALL_PREFIX)$(ARCH) \
- deb/debian/vpp-python-api.install ; \
+ : vpp-api-lua package ; \
+ ./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-api-lua.install ; \
+ \
+ : vpp-api-java package ; \
+ ./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-api-java.install ; \
+ \
+ : vpp-api-python package ; \
+ ./scripts/find-vpp-api-python-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-api-python.install ; \
\
: dpdk headers ; \
./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH) \
: dev package needs a couple of additions ; \
echo ../build-tool-native/tools/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
- echo ../../vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
+ echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
- for i in $$(ls ../vpp-api/java/jvpp/gen/jvppgen/*.py); do \
+ for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
>> deb/debian/vpp-dev.install; \
done; \
# Uncoment to enable building unit tests
# vpp_enable_tests = yes
-vpp_root_packages = vpp vpp-api gmod plugins
+vpp_root_packages = vpp gmod
vpp_configure_args_vpp = --with-dpdk
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
vlib_configure_args_vpp = --with-pre-data=128
-plugins_configure_args_vpp = --with-dpdk
-
# DPDK configuration parameters
# vpp_uses_dpdk_cryptodev = yes
# vpp_uses_dpdk_mlx5_pmd = yes
# Uncoment to enable building unit tests
#vpp_lite_enable_tests = yes
-vpp_lite_root_packages = vpp vpp-api gmod
+vpp_lite_root_packages = vpp gmod
vlib_configure_args_vpp_lite = --with-pre-data=128
vpp-dpdk-dkms/
vpp-dbg/
vppctl/
-vpp-python-api/
+vpp-api-lua/
+vpp-api-java/
+vpp-api-python/
Description: DPDK 2.1 igb_uio_driver
This package contains Linux kernel modules distributed with DPDK.
-Package: vpp-python-api
+Package: vpp-api-lua
+Architecture: any
+Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
+Description: VPP LUA API bindings
+ This package contains VPP lua api bindings
+ .
+
+Package: vpp-api-java
+Architecture: any
+Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
+Description: VPP Java API bindings
+ This package contains VPP java api bindings
+ .
+
+Package: vpp-api-python
Architecture: any
Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
Description: VPP Python API bindings
tools_source = src
-tools_configure_args = --disable-vlib
+tools_configure_args = --disable-vlib --disable-svm --disable-japi
%description plugins
This package contains VPP plugins
-%package python-api
+%package api-lua
+Summary: VPP api lua bindings
+Group: Development/Libraries
+Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}
+
+%description api-lua
+This package contains the lua bindings for the vpp api
+
+%package api-java
+Summary: VPP api java bindings
+Group: Development/Libraries
+Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}
+
+%description api-java
+This package contains the java bindings for the vpp api
+
+%package api-python
Summary: VPP api python bindings
Group: Development/Libraries
Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, python-setuptools
-%description python-api
+%description api-python
This package contains the python bindings for the vpp api
%prep
install -p -m 644 $file %{buildroot}/usr/share/vpp/api
done
+# Lua bindings
+mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/cli
+mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/lute
+for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && git ls-files .)
+do
+ install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua/$file \
+ %{buildroot}/usr/share/doc/vpp/examples/lua/$file
+done
+
+# Java bindings
+mkdir -p -m755 %{buildroot}/usr/share/java
+for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vpp/share/java -type f -name '*.jar' -print )
+do
+ install -p -m 644 $file %{buildroot}/usr/share/java
+done
+
# Python bindings
mkdir -p -m755 %{buildroot}%{python2_sitelib}
install -p -m 666 %{_mu_build_dir}/%{_vpp_install_dir}/*/lib/python2.7/site-packages/vpp_papi-*.egg %{buildroot}%{python2_sitelib}
done
mkdir -p -m755 %{buildroot}%{python2_sitelib}/jvppgen
-install -p -m755 %{_mu_build_dir}/../vpp-api/java/jvpp/gen/jvpp_gen.py %{buildroot}/usr/bin
-for i in $(ls %{_mu_build_dir}/../vpp-api/java/jvpp/gen/jvppgen/*.py); do
+install -p -m755 %{_mu_build_dir}/../src/vpp-api/java/jvpp/gen/jvpp_gen.py %{buildroot}/usr/bin
+for i in $(ls %{_mu_build_dir}/../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do
install -p -m666 ${i} %{buildroot}%{python2_sitelib}/jvppgen
done;
# sample plugin
mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
-for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../plugins/sample-plugin && git ls-files .)
+for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && git ls-files .)
do
- install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../plugins/sample-plugin/$file \
+ install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin/$file \
%{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file
done
#
mkdir -p -m755 %{buildroot}/usr/lib/vpp_plugins
mkdir -p -m755 %{buildroot}/usr/lib/vpp_api_test_plugins
-for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_plugins && find -type f -print)
-do
- install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_plugins/$file \
- %{buildroot}/usr/lib/vpp_plugins/$file
-done
-
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_plugins && find -type f -print)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_plugins/$file \
%{buildroot}/usr/lib/vpp_plugins/$file
done
-for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins && find -type f -print)
-do
- install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins/$file \
- %{buildroot}/usr/lib/vpp_api_test_plugins/$file
-done
-
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_api_test_plugins && find -type f -print)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_api_test_plugins/$file \
sysctl --system
%systemd_post vpp.service
-%post python-api
+%post api-python
easy_install -z %{python2_sitelib}/vpp_papi-*.egg
%preun
%systemd_preun vpp.service
-%preun python-api
+%preun api-python
easy_install -mxNq vpp_papi
%postun
%{_libdir}/*
/usr/share/vpp/api/*
-%files python-api
+%files api-lua
+%defattr(644,root,root)
+/usr/share/doc/vpp/examples/lua
+
+%files api-java
+%defattr(644,root,root)
+/usr/share/java/*
+
+%files api-python
%defattr(644,root,root)
%{python2_sitelib}/vpp_papi-*.egg
#!/bin/bash
-for i in $(find ${1}/vpp -name *.api.json -type f -print); do
+for i in $(find ${1}/vpp/share/vpp/api/core -name *.api.json -type f -print); do
echo ../${i} /usr/share/vpp/api/ >> ${2}
done
for i in $(find ${1}/vlib-api -name *.api.json -type f -print); do
done
# sample plugin
-paths=`(cd ..; find plugins/sample-plugin -type f -print | grep -v autom4te)`
+paths=`(cd ..; find src/examples/sample-plugin -type f -print | grep -v autom4te)`
for path in $paths
do
- relpath=`echo $path | sed -e 's:.*plugins/::'`
+ relpath=`echo $path | sed -e 's:.*src/examples/::'`
dir=`dirname $relpath`
if [ $dir = "sample-plugin" ] ; then
- echo ../../$path /usr/share/doc/vpp/examples/plugins/sample-plugin >> $2
+ echo ../../$path /usr/share/doc/vpp/examples/sample-plugin/ >> $2
else
echo ../../$path \
- /usr/share/doc/vpp/examples/plugins/$dir >> $2
+ /usr/share/doc/vpp/examples/$dir >> $2
fi
done
rm -f $2
-for i in ${1}/{plugins,vpp}/lib64/vpp_plugins/*.so; do
+for i in ${1}/vpp/lib64/vpp_plugins/*.so; do
echo ../${i} /usr/lib/vpp_plugins >> ${2}
done
-for i in ${1}/{plugins,vpp}/lib64/vpp_api_test_plugins/*.so; do
+for i in ${1}/vpp/lib64/vpp_api_test_plugins/*.so; do
echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2}
done
--- /dev/null
+#!/bin/bash
+
+rm -f $2
+
+for i in $(find ${1}/vpp/share/java/ -type f -print); do
+ echo ../${i} /usr/share/java >> ${2}
+done
+
--- /dev/null
+#!/bin/bash
+
+#i for now put everything into examples directory
+
+echo ../../src/vpp-api/lua /usr/share/vpp/examples > ${2}
+
rm -f $2
-for i in $(find ${1}/{vpp,vpp-api}/lib/python2.7/site-packages/ -type f -print); do
+for i in $(find ${1}/vpp/lib/python2.7/site-packages/ -type f -print); do
echo ../${i} /usr/lib/python2.7/site-packages/vpp_papi >> ${2}
done
$(DOXY_SRC)/vlibsocket \
$(DOXY_SRC)/vnet \
$(DOXY_SRC)/vpp \
- $(DOXY_SRC)/vpp-api \
- vpp-api
+ $(DOXY_SRC)/vpp-api
# Input directories and files
DOXY_INPUT ?= \
DOXY_EXCLUDE ?= \
$(DOXY_SRC)/vlib/vlib/buffer.c \
$(DOXY_SRC)/vlib/example \
- plugins/sample-plugin \
- vpp-api/lua
+ $(DOXY_SRC)/vpp-api/lua \
+ plugins/sample-plugin
# Generate a regexp for filenames to exclude
DOXY_EXCLUDE_REGEXP = ($(subst .,\.,$(shell echo '$(strip $(DOXY_EXCLUDE))' | sed -e 's/ /|/g')))
SUBDIRS += sample-plugin
endif
-if ENABLE_ioam_PLUGIN
-SUBDIRS += ioam-plugin
-endif
-
if ENABLE_vcgn_PLUGIN
SUBDIRS += vcgn-plugin
endif
-if ENABLE_snat_PLUGIN
-SUBDIRS += snat-plugin
-endif
-
-if ENABLE_lb_PLUGIN
-SUBDIRS += lb-plugin
-endif
-
-if ENABLE_acl_PLUGIN
-SUBDIRS += acl-plugin
-endif
+++ /dev/null
-# Copyright (c) 2016 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-AUTOMAKE_OPTIONS = foreign subdir-objects
-
-AM_CFLAGS = -Wall
-AM_LDFLAGS = -module -shared -avoid-version
-
-vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppapitestplugins_LTLIBRARIES = acl_test_plugin.la
-vppplugins_LTLIBRARIES = acl_plugin.la
-
-acl_plugin_la_SOURCES = \
- acl/acl.c \
- acl/node_in.c \
- acl/node_out.c \
- acl/l2sess.c \
- acl/l2sess_node.c \
- acl/l2sess.h \
- acl/acl_plugin.api.h
-
-BUILT_SOURCES = acl/acl.api.h acl/acl.api.json
-
-SUFFIXES = .api.h .api .api.json
-
-#
-# ACL API
-#
-%.api.h: %.api
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --output $@ --show-name $@
-
-%.api.json: %.api
- @echo " JSON APIGEN " $@ ; \
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --json $@
-
-apidir = $(prefix)/acl
-api_DATA = acl/acl.api.json
-
-noinst_HEADERS = \
- acl/acl_all_api_h.h \
- acl/acl_msg_enum.h \
- acl/acl.api.h
-
-acl_test_plugin_la_SOURCES = acl/acl_test.c acl/acl_plugin.api.h
-
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
- @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
-
-#
-# Java code generation
-#
-jvpp_registry_root = ../../vpp-api/java
-jvpp_registry_version = 17.04
-jacl_jarfile = jvpp-acl-$(PACKAGE_VERSION).jar
-jvpp_package_dir = io/fd/vpp/jvpp/acl
-jvpp_root = acl/jvpp
-jvpp_target_dir = target
-jvpp_target = $(jvpp_root)/$(jvpp_target_dir)
-
-lib_LTLIBRARIES = libjvpp_acl.la
-libjvpp_acl_la_SOURCES = acl/acl.api.h acl/jvpp_acl.c acl/jvpp/io_fd_vpp_jvpp_acl_JVppAclImpl.h
-libjvpp_acl_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
- -lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
-libjvpp_acl_la_LDFLAGS = -module
-libjvpp_acl_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
-
-BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h
-
-$(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h: acl/acl.api.json
- dir=`pwd`; \
- mkdir -p $(jvpp_target); \
- mkdir -p $(jvpp_root)/$(jvpp_package_dir); \
- cd $(jvpp_root)/$(jvpp_package_dir); \
- mkdir -p types dto future callfacade callback notification test; \
- @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/acl/acl.api.json --plugin_name acl; \
- cd -; \
- mv -f $(jvpp_root)/$(jvpp_package_dir)/jvpp_acl_gen.h $(jvpp_root)/jvpp_acl_gen.h; \
- cp $(srcdir)/$(jvpp_root)/$(jvpp_package_dir)/test/*.java $(jvpp_root)/$(jvpp_package_dir)/test/; \
- cd $(jvpp_root); \
- $(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_package_dir)/*.java \
- $(jvpp_package_dir)/types/*.java \
- $(jvpp_package_dir)/dto/*.java \
- $(jvpp_package_dir)/callback/*.java \
- $(jvpp_package_dir)/notification/*.java \
- $(jvpp_package_dir)/future/*.java \
- $(jvpp_package_dir)/callfacade/*.java \
- $(jvpp_package_dir)/test/*.java \
- || (echo "acl jvpp compilation failed: $$?"; exit 1); \
- $(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.acl.JVppAclImpl ;
-
-$(jacl_jarfile): libjvpp_acl.la
- cp .libs/libjvpp_acl.so.0.0.0 $(jvpp_target); \
- cd $(jvpp_target); \
- $(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_acl.so.0.0.0 $(jvpp_package_dir)/* ; cd ..;
-
-all-local: $(jacl_jarfile)
+++ /dev/null
-AC_INIT(acl_plugin, 1.0)
-AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
-LT_INIT
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-AC_PREFIX_DEFAULT([/usr])
-
-AC_PROG_CC
-
-if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
- JAVAC=${JAVA_HOME}/bin/javac
- PATH=${JAVA_HOME}/bin/:${PATH}
- break
-fi
-
-AX_CHECK_JAVA_HOME
-AX_PROG_JAVAC
-AX_PROG_JAVAH
-AX_PROG_JAR
-AX_PROG_JAVADOC
-AX_PROG_JAVA
-
-AC_OUTPUT([Makefile])
# SUBDIRS += new-plugin
# endif
-PLUGIN_ENABLED(ioam)
-PLUGIN_ENABLED(snat)
-PLUGIN_ENABLED(lb)
-PLUGIN_ENABLED(acl)
-
# Disabled plugins, require --enable-XXX-plugin
PLUGIN_DISABLED(vcgn)
PLUGIN_DISABLED(sample)
+++ /dev/null
-# Copyright (c) 2015 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-AUTOMAKE_OPTIONS = foreign subdir-objects
-
-AM_CFLAGS = -Wall
-AM_LDFLAGS = -module -shared -avoid-version
-
-########################################
-# iOAM Proof of Transit
-########################################
-
-ioam_pot_plugin_la_SOURCES = \
- ioam/lib-pot/pot_util.c \
- ioam/encap/ip6_ioam_pot.c \
- ioam/lib-pot/pot_util.h \
- ioam/lib-pot/math64.h \
- ioam/lib-pot/pot_api.c
-
-BUILT_SOURCES = \
- ioam/lib-pot/pot.api.h \
- ioam/lib-pot/pot.api.json
-
-SUFFIXES = .api.h .api
-
-%.api.h: %.api
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --output $@ --show-name $@
-
-%.api.json: %.api
- @echo " JSON APIGEN " $@ ; \
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --json $@
-
-apidir = $(prefix)/ioam/
-api_DATA = \
- ioam/lib-pot/pot.api.json \
- ioam/lib-trace/trace.api.json \
- ioam/export/ioam_export.api.json
-
-noinst_HEADERS = \
- ioam/lib-pot/pot_all_api_h.h \
- ioam/lib-pot/pot_msg_enum.h \
- ioam/lib-pot/pot.api.h \
- ioam/lib-pot/pot_util.h \
- ioam/lib-pot/math64.h
-
-ioam_pot_test_plugin_la_SOURCES = \
- ioam/lib-pot/pot_test.c \
- ioam/lib-pot/pot_plugin.api.h
-
-vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppapitestplugins_LTLIBRARIES = ioam_pot_test_plugin.la
-vppplugins_LTLIBRARIES = ioam_pot_plugin.la
-
-########################################
-# iOAM trace export for IPv6
-########################################
-
-ioam_export_plugin_la_SOURCES = \
-ioam/export/ioam_export.c \
-ioam/export/node.c \
-ioam/export/ioam_export.api.h \
-ioam/export/ioam_export_thread.c
-
-BUILT_SOURCES += \
- ioam/export/ioam_export.api.h \
- ioam/export/ioam_export.api.json
-
-noinst_HEADERS += \
- ioam/export/ioam_export_all_api_h.h \
- ioam/export/ioam_export_msg_enum.h \
- ioam/export/ioam_export.api.h
-
-ioam_export_test_plugin_la_SOURCES = \
- ioam/export/ioam_export_test.c \
- ioam/export/ioam_export_plugin.api.h
-
-vppapitestplugins_LTLIBRARIES += ioam_export_test_plugin.la
-vppplugins_LTLIBRARIES += ioam_export_plugin.la
-
-########################################
-# iOAM Trace
-########################################
-libioam_trace_plugin_la_SOURCES = \
- ioam/lib-trace/trace_util.c \
- ioam/encap/ip6_ioam_trace.c \
- ioam/lib-trace/trace_util.h \
- ioam/lib-trace/trace_api.c
-
-BUILT_SOURCES += \
- ioam/lib-trace/trace.api.h \
- ioam/lib-trace/trace.api.json
-
-noinst_HEADERS += \
- ioam/export/ioam_export_all_api_h.h \
- ioam/lib-trace/trace_all_api_h.h \
- ioam/lib-trace/trace_msg_enum.h \
- ioam/lib-trace/trace.api.h \
- ioam/lib-trace/trace_util.h
-
-ioam_trace_test_plugin_la_SOURCES = \
- ioam/lib-trace/trace_test.c \
- ioam/lib-trace/trace_plugin.api.h
-
-vppapitestplugins_LTLIBRARIES += ioam_trace_test_plugin.la
-vppplugins_LTLIBRARIES += libioam_trace_plugin.la
-
-########################################
-# VxLAN-GPE
-########################################
-libioam_vxlan_gpe_plugin_la_SOURCES = \
- ioam/lib-vxlan-gpe/ioam_encap.c \
- ioam/lib-vxlan-gpe/ioam_decap.c \
- ioam/lib-vxlan-gpe/ioam_transit.c \
- ioam/lib-vxlan-gpe/ioam_pop.c \
- ioam/lib-vxlan-gpe/vxlan_gpe_api.c \
- ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c \
- ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c \
- ioam/export-vxlan-gpe/vxlan_gpe_node.c \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h\
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c
-
-BUILT_SOURCES += \
- ioam/lib-vxlan-gpe/vxlan_gpe.api.h \
- ioam/lib-vxlan-gpe/vxlan_gpe.api.json \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.json
-
-noinst_HEADERS += \
- ioam/export/ioam_export_all_api_h.h \
- ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h \
- ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h \
- ioam/lib-vxlan-gpe/vxlan_gpe.api.h \
- ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h \
- ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h \
- ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h
-
-ioam_vxlan_gpe_test_plugin_la_SOURCES = \
- ioam/lib-vxlan-gpe/vxlan_gpe_test.c \
- ioam/lib-vxlan-gpe/vxlan_gpe_plugin.api.h
-
-libioam_vxlan_gpe_plugin_la_LIBADD = libioam_trace_plugin.la
-
-vppapitestplugins_LTLIBRARIES += ioam_vxlan_gpe_test_plugin.la
-vppplugins_LTLIBRARIES += libioam_vxlan_gpe_plugin.la
-
-vxlan_gpe_ioam_export_test_plugin_la_SOURCES = \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c \
- ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_plugin.api.h
-
-vppapitestplugins_LTLIBRARIES += vxlan_gpe_ioam_export_test_plugin.la
-
-########################################
-# iOAM E2E plugin
-########################################
-
-ioam_e2e_plugin_la_SOURCES = \
- ioam/encap/ip6_ioam_e2e.c \
- ioam/encap/ip6_ioam_seqno.c \
- ioam/encap/ip6_ioam_seqno_analyse.c
-
-noinst_HEADERS += \
- ioam/encap/ip6_ioam_e2e.h \
- ioam/encap/ip6_ioam_seqno.h
-
-vppplugins_LTLIBRARIES += ioam_e2e_plugin.la
-
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
- @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
-
-
-#
-# Java code generation
-#
-jvpp_registry_root = ../../vpp-api/java
-jvpp_registry_version = 17.04
-jioam_trace_jarfile = jvpp-ioam-trace-$(PACKAGE_VERSION).jar
-jvpp_trace_package_dir = io/fd/vpp/jvpp/ioamtrace
-jvpp_root = ioam/jvpp
-jvpp_target_dir = target
-jvpp_target = $(jvpp_root)/$(jvpp_target_dir)
-trace_api_file=$(srcdir)/ioam/lib-trace/trace.api
-
-
-lib_LTLIBRARIES = libjvpp_ioamtrace.la
-libjvpp_ioamtrace_la_SOURCES = ioam/lib-trace/trace.api.h ioam/lib-trace/jvpp_ioam_trace.c ioam/jvpp/io_fd_vpp_jvpp_ioam_trace_JVppIoamTraceImpl.h
-libjvpp_ioamtrace_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
- -lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
-libjvpp_ioamtrace_la_LDFLAGS = -module
-libjvpp_ioamtrace_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
-
-BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h
-
-$(jvpp_root)/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h: ioam_trace.api.json
- dir=`pwd`; \
- mkdir -p $(jvpp_target); \
- mkdir -p $(jvpp_root)/$(jvpp_trace_package_dir); \
- cd $(jvpp_root)/$(jvpp_trace_package_dir); \
- mkdir -p dto future callfacade callback notification test; \
- @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/ioam_trace.api.json --plugin_name ioamtrace; \
- cd -; \
- mv -f $(jvpp_root)/$(jvpp_trace_package_dir)/jvpp_ioamtrace_gen.h $(jvpp_root)/jvpp_ioam_trace_gen.h; \
- cp $(srcdir)/$(jvpp_root)/$(jvpp_trace_package_dir)/test/*.java $(jvpp_root)/$(jvpp_trace_package_dir)/test/; \
- cd $(jvpp_root); \
- $(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_trace_package_dir)/*.java \
- $(jvpp_trace_package_dir)/dto/*.java \
- $(jvpp_trace_package_dir)/callback/*.java \
- $(jvpp_trace_package_dir)/notification/*.java \
- $(jvpp_trace_package_dir)/future/*.java \
- $(jvpp_trace_package_dir)/callfacade/*.java \
- $(jvpp_trace_package_dir)/test/*.java \
- || (echo "ioam trace jvpp compilation failed: $$?"; exit 1); \
- $(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.ioamtrace.JVppIoamtraceImpl ;
-
-$(jioam_trace_jarfile): libjvpp_ioamtrace.la
- cp .libs/libjvpp_ioamtrace.so.0.0.0 $(jvpp_target); \
- cd $(jvpp_target); \
- $(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_ioamtrace.so.0.0.0 $(jvpp_trace_package_dir)/* ; cd ..;
-
-ioam_trace.api.json:
- @echo " jIoam_trace API"; \
- vppapigen --input $(trace_api_file) --json ioam_trace.api.json;
-
-all-local: $(jioam_trace_jarfile)
-
-
-jioam_pot_jarfile = jvpp-ioam-pot-$(PACKAGE_VERSION).jar
-jvpp_pot_package_dir = io/fd/vpp/jvpp/ioampot
-pot_api_file=$(srcdir)/ioam/lib-pot/pot.api
-
-
-lib_LTLIBRARIES += libjvpp_ioampot.la
-libjvpp_ioampot_la_SOURCES = ioam/lib-pot/pot.api.h ioam/lib-pot/jvpp_ioam_pot.c ioam/jvpp/io_fd_vpp_jvpp_ioam_pot_JVppIoamPotImpl.h
-libjvpp_ioampot_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
- -lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
-libjvpp_ioampot_la_LDFLAGS = -module
-libjvpp_ioampot_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
-
-BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_ioampot_JVppIoampotImpl.h
-
-$(jvpp_root)/io_fd_vpp_jvpp_ioampot_JVppIoampotImpl.h: ioam_pot.api.json
- dir=`pwd`; \
- mkdir -p $(jvpp_target); \
- mkdir -p $(jvpp_root)/$(jvpp_pot_package_dir); \
- cd $(jvpp_root)/$(jvpp_pot_package_dir); \
- mkdir -p dto future callfacade callback notification test; \
- @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/ioam_pot.api.json --plugin_name ioampot; \
- cd -; \
- mv -f $(jvpp_root)/$(jvpp_pot_package_dir)/jvpp_ioampot_gen.h $(jvpp_root)/jvpp_ioam_pot_gen.h; \
- cp $(srcdir)/$(jvpp_root)/$(jvpp_pot_package_dir)/test/*.java $(jvpp_root)/$(jvpp_pot_package_dir)/test/; \
- cd $(jvpp_root); \
- $(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_pot_package_dir)/*.java \
- $(jvpp_pot_package_dir)/dto/*.java \
- $(jvpp_pot_package_dir)/callback/*.java \
- $(jvpp_pot_package_dir)/notification/*.java \
- $(jvpp_pot_package_dir)/future/*.java \
- $(jvpp_pot_package_dir)/callfacade/*.java \
- $(jvpp_pot_package_dir)/test/*.java \
- || (echo "ioam pot jvpp compilation failed: $$?"; exit 1); \
- $(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.ioampot.JVppIoampotImpl ;
-
-$(jioam_pot_jarfile): libjvpp_ioampot.la
- cp .libs/libjvpp_ioampot.so.0.0.0 $(jvpp_target); \
- cd $(jvpp_target); \
- $(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_ioampot.so.0.0.0 $(jvpp_pot_package_dir)/* ; cd ..;
-
-ioam_pot.api.json:
- @echo " jIoam_pot API"; \
- vppapigen --input $(pot_api_file) --json ioam_pot.api.json;
-
-all-local: $(jioam_pot_jarfile)
-
-jioam_export_jarfile = jvpp-ioam-export-$(PACKAGE_VERSION).jar
-jvpp_export_package_dir = io/fd/vpp/jvpp/ioamexport
-export_api_file=$(srcdir)/ioam/export/ioam_export.api
-
-
-lib_LTLIBRARIES += libjvpp_ioamexport.la
-libjvpp_ioamexport_la_SOURCES = ioam/export/export.api.h ioam/export/jvpp_ioam_export.c ioam/jvpp/io_fd_vpp_jvpp_ioam_export_JVppIoamexportImpl.h
-libjvpp_ioamexport_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
- -lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
-libjvpp_ioamexport_la_LDFLAGS = -module
-libjvpp_ioamexport_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
-
-BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl.h
-
-$(jvpp_root)/io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl.h: ioam_export.api.json
- dir=`pwd`; \
- mkdir -p $(jvpp_target); \
- mkdir -p $(jvpp_root)/$(jvpp_export_package_dir); \
- cd $(jvpp_root)/$(jvpp_export_package_dir); \
- mkdir -p dto future callfacade callback notification test; \
- @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/ioam_export.api.json --plugin_name ioamexport; \
- cd -; \
- mv -f $(jvpp_root)/$(jvpp_export_package_dir)/jvpp_ioamexport_gen.h $(jvpp_root)/jvpp_ioam_export_gen.h; \
- cp $(srcdir)/$(jvpp_root)/$(jvpp_export_package_dir)/test/*.java $(jvpp_root)/$(jvpp_export_package_dir)/test/; \
- cd $(jvpp_root); \
- $(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_export_package_dir)/*.java \
- $(jvpp_export_package_dir)/dto/*.java \
- $(jvpp_export_package_dir)/callback/*.java \
- $(jvpp_export_package_dir)/notification/*.java \
- $(jvpp_export_package_dir)/future/*.java \
- $(jvpp_export_package_dir)/callfacade/*.java \
- $(jvpp_export_package_dir)/test/*.java \
- || (echo "ioam export jvpp compilation failed: $$?"; exit 1); \
- $(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.ioamexport.JVppIoamexportImpl ;
-
-$(jioam_export_jarfile): libjvpp_ioamexport.la
- cp .libs/libjvpp_ioamexport.so.0.0.0 $(jvpp_target); \
- cd $(jvpp_target); \
- $(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_ioamexport.so.0.0.0 $(jvpp_export_package_dir)/* ; cd ..;
-
-ioam_export.api.json:
- @echo " jIoam_export API"; \
- vppapigen --input $(export_api_file) --json ioam_export.api.json;
-
-all-local: $(jioam_export_jarfile)
+++ /dev/null
-AC_INIT(ioam_plugin, 1.0)
-LT_INIT
-AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
-AM_INIT_AUTOMAKE
-AC_PREFIX_DEFAULT([/usr])
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
- JAVAC=${JAVA_HOME}/bin/javac
- PATH=${JAVA_HOME}/bin/:${PATH}
- break
-fi
-
-AX_CHECK_JAVA_HOME
-AX_PROG_JAVAC
-AX_PROG_JAVAH
-AX_PROG_JAR
-AX_PROG_JAVADOC
-AX_PROG_JAVA
-
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-AUTOMAKE_OPTIONS = foreign subdir-objects
-
-AM_CFLAGS = -Wall
-AM_LDFLAGS = -module -shared -avoid-version
-
-vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppapitestplugins_LTLIBRARIES = lb_test_plugin.la
-vppplugins_LTLIBRARIES = lb_plugin.la
-
-lb_plugin_la_SOURCES = lb/lb.c lb/node.c lb/cli.c lb/util.c lb/refcount.c lb/api.c
-
-BUILT_SOURCES = \
- lb/lb.api.h \
- lb/lb.api.json
-
-SUFFIXES = .api.h .api .api.json
-
-%.api.h: %.api
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --output $@ --show-name $@
-
-%.api.json: %.api
- @echo " JSON APIGEN " $@ ; \
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --json $@
-
-apidir = $(prefix)/lb/
-api_DATA = lb/lb.api.json
-
-noinst_HEADERS = lb/lb.h lb/util.h lb/refcount.h lb/lbhash.h lb/lb.api.h
-
-lb_test_plugin_la_SOURCES = \
- lb/lb_test.c lb/lb_plugin.api.h
-
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
- @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
+++ /dev/null
-AC_INIT(lb_plugin, 1.0)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-AC_PREFIX_DEFAULT([/usr])
-
-AC_PROG_LIBTOOL
-AC_PROG_CC
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-
-# Copyright (c) <current-year> <your-organization>
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-AUTOMAKE_OPTIONS = foreign subdir-objects
-
-AM_CFLAGS = -Wall @DPDK@
-AM_LDFLAGS = -module -shared -avoid-version
-
-vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppapitestplugins_LTLIBRARIES = snat_test_plugin.la
-vppplugins_LTLIBRARIES = snat_plugin.la
-
-snat_plugin_la_SOURCES = snat/snat.c \
- snat/in2out.c \
- snat/out2in.c \
- snat/snat_plugin.api.h
-
-BUILT_SOURCES = snat/snat.api.h snat/snat.api.json
-
-SUFFIXES = .api.h .api
-
-%.api.h: %.api
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --output $@ --show-name $@
-
-%.api.json: %.api
- @echo " JSON APIGEN " $@ ; \
- mkdir -p `dirname $@` ; \
- $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --json $@
-
-apidir = $(prefix)/snat/
-api_DATA = snat.api.json
-
-noinst_HEADERS = \
- snat/snat_all_api_h.h \
- snat/snat_msg_enum.h \
- snat/snat.api.h
-
-snat_test_plugin_la_SOURCES = \
- snat/snat_test.c snat/snat_plugin.api.h
-
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
- @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
-
-#
-# Java code generation
-#
-jvpp_registry_root = ../../vpp-api/java
-jvpp_registry_version = 17.04
-jsnat_jarfile = jvpp-snat-$(PACKAGE_VERSION).jar
-jvpp_package_dir = io/fd/vpp/jvpp/snat
-jvpp_root = snat/jvpp
-jvpp_target_dir = target
-jvpp_target = $(jvpp_root)/$(jvpp_target_dir)
-api_file=$(srcdir)/snat/snat.api
-
-lib_LTLIBRARIES = libjvpp_snat.la
-libjvpp_snat_la_SOURCES = snat/snat.api.h snat/jvpp_snat.c snat/jvpp/io_fd_vpp_jvpp_snat_JVppSnatImpl.h
-libjvpp_snat_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
- -lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
-libjvpp_snat_la_LDFLAGS = -module
-libjvpp_snat_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
-
-BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_snat_JVppSnatImpl.h
-
-$(jvpp_root)/io_fd_vpp_jvpp_snat_JVppSnatImpl.h: snat.api.json
- dir=`pwd`; \
- mkdir -p $(jvpp_target); \
- mkdir -p $(jvpp_root)/$(jvpp_package_dir); \
- cd $(jvpp_root)/$(jvpp_package_dir); \
- mkdir -p dto future callfacade callback notification test; \
- @srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/snat.api.json --plugin_name snat; \
- cd -; \
- mv -f $(jvpp_root)/$(jvpp_package_dir)/jvpp_snat_gen.h $(jvpp_root)/jvpp_snat_gen.h; \
- cp $(srcdir)/$(jvpp_root)/$(jvpp_package_dir)/test/*.java $(jvpp_root)/$(jvpp_package_dir)/test/; \
- cd $(jvpp_root); \
- $(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_package_dir)/*.java \
- $(jvpp_package_dir)/dto/*.java \
- $(jvpp_package_dir)/callback/*.java \
- $(jvpp_package_dir)/notification/*.java \
- $(jvpp_package_dir)/future/*.java \
- $(jvpp_package_dir)/callfacade/*.java \
- $(jvpp_package_dir)/test/*.java \
- || (echo "snat jvpp compilation failed: $$?"; exit 1); \
- $(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.snat.JVppSnatImpl ;
-
-$(jsnat_jarfile): libjvpp_snat.la
- cp .libs/libjvpp_snat.so.0.0.0 $(jvpp_target); \
- cd $(jvpp_target); \
- $(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_snat.so.0.0.0 $(jvpp_package_dir)/* ; cd ..;
-
-snat.api.json:
- @echo " jSnat_sfc API"; \
- vppapigen --input $(api_file) --json snat.api.json;
-
-all-local: $(jsnat_jarfile)
+++ /dev/null
-AC_INIT(snat_plugin, 1.0)
-AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-AC_PREFIX_DEFAULT([/usr])
-
-AC_PROG_LIBTOOL
-AC_PROG_CC
-
-if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
- JAVAC=${JAVA_HOME}/bin/javac
- PATH=${JAVA_HOME}/bin/:${PATH}
- break
-fi
-
-AX_CHECK_JAVA_HOME
-AX_PROG_JAVAC
-AX_PROG_JAVAH
-AX_PROG_JAR
-AX_PROG_JAVADOC
-AX_PROG_JAVA
-
-AC_ARG_WITH(dpdk,
- AC_HELP_STRING([--with-dpdk],[Use DPDK]),
- [with_dpdk=1],
- [with_dpdk=0])
-
-AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
-AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"])
-
-AC_OUTPUT([Makefile])
include vpp.am
include vpp-api-test.am
-SUBDIRS += vpp-api/python plugins
+SUBDIRS += plugins
+
+if ENABLE_PAPI
+SUBDIRS += vpp-api/python
+endif
+
+if ENABLE_JAPI
+SUBDIRS += vpp-api/java
+endif
###############################################################################
# API
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([subdir-objects])
AM_SILENT_RULES([yes])
-AC_CONFIG_FILES([Makefile plugins/Makefile vpp-api/python/Makefile])
+AC_CONFIG_FILES([Makefile plugins/Makefile vpp-api/python/Makefile vpp-api/java/Makefile])
+AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AM_PROG_AS
# --disable-X
DISABLE_ARG(vlib, [Disable vlib and dependant libs and binaries])
DISABLE_ARG(svm, [Disable svm and dependant libs and binaries])
+DISABLE_ARG(papi, [Disable Python API bindings])
+DISABLE_ARG(japi, [Disable Java API bindings])
# --with-X
WITH_ARG(dpdk, [Use use DPDK])
AC_DEFINE_UNQUOTED(IPSEC, [${n_with_ipsec}])
AC_DEFINE_UNQUOTED(IPV6SR, [${n_with_ipv6sr}])
+
+# Silence following noise:
+# ar: `u' modifier ignored since `D' is the default (see `U')
+AR_FLAGS=cr
+AC_SUBST(AR_FLAGS)
+
+###############################################################################
+# Plugins
+###############################################################################
+
+# Please keep alphabetical order
+PLUGIN_ENABLED(acl)
+PLUGIN_ENABLED(flowperpkt)
+PLUGIN_ENABLED(ila)
+PLUGIN_ENABLED(ioam)
+PLUGIN_ENABLED(lb)
+PLUGIN_ENABLED(sixrd)
+PLUGIN_ENABLED(snat)
+
###############################################################################
# Dependency checks
###############################################################################
])
###############################################################################
-# Plugins
+# JAVA
###############################################################################
-PLUGIN_ENABLED(sixrd)
-PLUGIN_ENABLED(ila)
-PLUGIN_ENABLED(flowperpkt)
+AM_COND_IF([ENABLE_JAPI],
+[
+ AX_VPP_FIND_JDK8
+ AC_SUBST(JAVA_HOME)
+ AC_SUBST(JAVAC)
+ AC_SUBST(JAVAH)
+ AC_SUBST(JAR)
+])
###############################################################################
# Output
PRINT_VAL([CFLAGS], ${CFLAGS})
PRINT_VAL([CPPFLAGS], ${CPPFLAGS})
PRINT_VAL([LDFLAGS], ${LDFLAGS})
+AM_COND_IF([ENABLE_JAPI],
+[
+ PRINT_VAL([JAVA_VERSION], ${JAVA_VERSION})
+ PRINT_VAL([JAVA_HOME], ${JAVA_HOME})
+])
AC_MSG_RESULT([])
AC_MSG_RESULT([with:])
--- /dev/null
+
+
+AC_DEFUN([AX_VPP_FIND_JDK8],
+[
+while true
+do
+ test "${JAVA_HOME+set}" = set && break
+
+ for dir in $(find /usr/lib/jvm/* -maxdepth 0 -type d); do
+ AC_MSG_CHECKING([${dir} for Java 8 compiler])
+ JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1)
+ if test 0 -eq "$?"; then
+ JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2)
+ JAVA_HOME=${dir}
+ JAVAC=${dir}/bin/javac
+ JAVAH=${dir}/bin/javah
+ JAR=${dir}/bin/jar
+ AC_MSG_RESULT([found version $JAVA_VERSION])
+ break
+ else
+ JAVA_VERSION=""
+ AC_MSG_RESULT([no])
+ fi
+ done
+
+ test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler])
+ break
+done
+])
vppplugins_LTLIBRARIES =
vppapitestplugins_LTLIBRARIES =
noinst_HEADERS =
+nobase_apiinclude_HEADERS =
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
vpppluginsdir = ${libdir}/vpp_plugins
+if ENABLE_ACL_PLUGIN
+include acl.am
+endif
+
if ENABLE_FLOWPERPKT_PLUGIN
include flowperpkt.am
endif
include ila.am
endif
+if ENABLE_IOAM_PLUGIN
+include ioam.am
+endif
+
+if ENABLE_LB_PLUGIN
+include lb.am
+endif
+
if ENABLE_SIXRD_PLUGIN
include sixrd.am
endif
+if ENABLE_SNAT_PLUGIN
+include snat.am
+endif
+
include ../suffix-rules.mk
# Remove *.la files
###############################################################################
apidir = $(prefix)/share/vpp/api/plugins
+apiincludedir = ${includedir}/vpp_plugins
api_DATA = \
$(patsubst %.api,%.api.json,$(API_FILES))
--- /dev/null
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+vppapitestplugins_LTLIBRARIES += acl_test_plugin.la
+vppplugins_LTLIBRARIES += acl_plugin.la
+
+acl_plugin_la_SOURCES = \
+ acl/acl.c \
+ acl/node_in.c \
+ acl/node_out.c \
+ acl/l2sess.c \
+ acl/l2sess_node.c \
+ acl/l2sess.h \
+ acl/acl_plugin.api.h
+
+API_FILES += acl/acl.api
+
+nobase_apiinclude_HEADERS += \
+ acl/acl_all_api_h.h \
+ acl/acl_msg_enum.h \
+ acl/acl.api.h
+
+acl_test_plugin_la_SOURCES = acl/acl_test.c acl/acl_plugin.api.h
+
+# vi:syntax=automake
--- /dev/null
+# Copyright (c) 2015 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+########################################
+# iOAM Proof of Transit
+########################################
+
+ioam_pot_plugin_la_SOURCES = \
+ ioam/lib-pot/pot_util.c \
+ ioam/encap/ip6_ioam_pot.c \
+ ioam/lib-pot/pot_util.h \
+ ioam/lib-pot/math64.h \
+ ioam/lib-pot/pot_api.c
+
+noinst_HEADERS += \
+ ioam/lib-pot/pot_all_api_h.h \
+ ioam/lib-pot/pot_msg_enum.h \
+ ioam/lib-pot/pot.api.h \
+ ioam/lib-pot/pot_util.h \
+ ioam/lib-pot/math64.h
+
+API_FILES += ioam/lib-pot/pot.api
+
+ioam_pot_test_plugin_la_SOURCES = \
+ ioam/lib-pot/pot_test.c \
+ ioam/lib-pot/pot_plugin.api.h
+
+vppapitestplugins_LTLIBRARIES += ioam_pot_test_plugin.la
+vppplugins_LTLIBRARIES += ioam_pot_plugin.la
+
+########################################
+# iOAM trace export for IPv6
+########################################
+
+ioam_export_plugin_la_SOURCES = \
+ioam/export/ioam_export.c \
+ioam/export/node.c \
+ioam/export/ioam_export.api.h \
+ioam/export/ioam_export_thread.c
+
+noinst_HEADERS += \
+ ioam/export/ioam_export_all_api_h.h \
+ ioam/export/ioam_export_msg_enum.h \
+ ioam/export/ioam_export.api.h
+
+API_FILES += ioam/export/ioam_export.api
+
+ioam_export_test_plugin_la_SOURCES = \
+ ioam/export/ioam_export_test.c \
+ ioam/export/ioam_export_plugin.api.h
+
+vppapitestplugins_LTLIBRARIES += ioam_export_test_plugin.la
+vppplugins_LTLIBRARIES += ioam_export_plugin.la
+
+########################################
+# iOAM Trace
+########################################
+libioam_trace_plugin_la_SOURCES = \
+ ioam/lib-trace/trace_util.c \
+ ioam/encap/ip6_ioam_trace.c \
+ ioam/lib-trace/trace_util.h \
+ ioam/lib-trace/trace_api.c
+
+noinst_HEADERS += \
+ ioam/export/ioam_export_all_api_h.h \
+ ioam/lib-trace/trace_all_api_h.h \
+ ioam/lib-trace/trace_msg_enum.h \
+ ioam/lib-trace/trace.api.h \
+ ioam/lib-trace/trace_util.h
+
+API_FILES += ioam/lib-trace/trace.api
+
+ioam_trace_test_plugin_la_SOURCES = \
+ ioam/lib-trace/trace_test.c \
+ ioam/lib-trace/trace_plugin.api.h
+
+vppapitestplugins_LTLIBRARIES += ioam_trace_test_plugin.la
+vppplugins_LTLIBRARIES += libioam_trace_plugin.la
+
+########################################
+# VxLAN-GPE
+########################################
+libioam_vxlan_gpe_plugin_la_SOURCES = \
+ ioam/lib-vxlan-gpe/ioam_encap.c \
+ ioam/lib-vxlan-gpe/ioam_decap.c \
+ ioam/lib-vxlan-gpe/ioam_transit.c \
+ ioam/lib-vxlan-gpe/ioam_pop.c \
+ ioam/lib-vxlan-gpe/vxlan_gpe_api.c \
+ ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c \
+ ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c \
+ ioam/export-vxlan-gpe/vxlan_gpe_node.c \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h\
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c
+
+noinst_HEADERS += \
+ ioam/export/ioam_export_all_api_h.h \
+ ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h \
+ ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h \
+ ioam/lib-vxlan-gpe/ioam_vxlan_gpe.api.h \
+ ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h \
+ ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h \
+ ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h
+
+API_FILES += ioam/lib-vxlan-gpe/ioam_vxlan_gpe.api
+API_FILES += ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api
+
+ioam_vxlan_gpe_test_plugin_la_SOURCES = \
+ ioam/lib-vxlan-gpe/vxlan_gpe_test.c \
+ ioam/lib-vxlan-gpe/vxlan_gpe_plugin.api.h
+
+vppapitestplugins_LTLIBRARIES += ioam_vxlan_gpe_test_plugin.la
+vppplugins_LTLIBRARIES += libioam_vxlan_gpe_plugin.la
+
+vxlan_gpe_ioam_export_test_plugin_la_SOURCES = \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c \
+ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_plugin.api.h
+
+vppapitestplugins_LTLIBRARIES += vxlan_gpe_ioam_export_test_plugin.la
+
+########################################
+# iOAM E2E plugin
+########################################
+
+ioam_e2e_plugin_la_SOURCES = \
+ ioam/encap/ip6_ioam_e2e.c \
+ ioam/encap/ip6_ioam_seqno.c \
+ ioam/encap/ip6_ioam_seqno_analyse.c
+
+noinst_HEADERS += \
+ ioam/encap/ip6_ioam_e2e.h \
+ ioam/encap/ip6_ioam_seqno.h
+
+vppplugins_LTLIBRARIES += ioam_e2e_plugin.la
+
+# vi:syntax=automake
ioam_export_main_t ioam_export_main;
ioam_export_main_t vxlan_gpe_ioam_export_main;
-vlib_node_registration_t export_node;
+extern vlib_node_registration_t export_node;
#define DEFAULT_EXPORT_SIZE (3 * CLIB_CACHE_LINE_BYTES)
/*
* limitations under the License.
*/
/* Include the generated file, see BUILT_SOURCES in Makefile.am */
-#include <ioam/lib-vxlan-gpe/vxlan_gpe.api.h>
+#include <ioam/lib-vxlan-gpe/ioam_vxlan_gpe.api.h>
} ioam_trace_t;
-vlib_node_registration_t vxlan_gpe_encap_ioam_v4_node;
-vlib_node_registration_t vxlan_gpe_decap_ioam_v4_node;
-vlib_node_registration_t vxlan_gpe_transit_ioam_v4_node;
+extern vlib_node_registration_t vxlan_gpe_encap_ioam_v4_node;
+extern vlib_node_registration_t vxlan_gpe_decap_ioam_v4_node;
+extern vlib_node_registration_t vxlan_gpe_transit_ioam_v4_node;
clib_error_t *vxlan_gpe_ioam_enable (int has_trace_option, int has_pot_option,
int has_ppc_option);
--- /dev/null
+# Copyright (c) 2016 Cisco Systems, Inc.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+vppapitestplugins_LTLIBRARIES += lb_test_plugin.la
+vppplugins_LTLIBRARIES += lb_plugin.la
+
+lb_plugin_la_SOURCES = \
+ lb/lb.c \
+ lb/node.c \
+ lb/cli.c \
+ lb/util.c \
+ lb/refcount.c \
+ lb/api.c
+
+BUILT_SOURCES += \
+ lb/lb.api.h \
+ lb/lb.api.json
+
+API_FILES += lb/lb.api
+
+noinst_HEADERS += \
+ lb/lb.h \
+ lb/util.h \
+ lb/refcount.h \
+ lb/lbhash.h \
+ lb/lb.api.h
+
+lb_test_plugin_la_SOURCES = \
+ lb/lb_test.c \
+ lb/lb_plugin.api.h
+
+# vi:syntax=automake
--- /dev/null
+
+# Copyright (c) <current-year> <your-organization>
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+vppapitestplugins_LTLIBRARIES += snat_test_plugin.la
+vppplugins_LTLIBRARIES += snat_plugin.la
+
+snat_plugin_la_SOURCES = snat/snat.c \
+ snat/in2out.c \
+ snat/out2in.c \
+ snat/snat_plugin.api.h
+
+API_FILES += snat/snat.api
+
+nobase_apiinclude_HEADERS += \
+ snat/snat_all_api_h.h \
+ snat/snat_msg_enum.h \
+ snat/snat.api.h
+
+snat_test_plugin_la_SOURCES = \
+ snat/snat_test.c snat/snat_plugin.api.h
+
+# vi:syntax=automake
@echo " APIGEN " $@ ; \
mkdir -p `dirname $@` ; \
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --output $@ --show-name $@
+ | vppapigen --input - --output $@ --show-name $@ > /dev/null
%.api.json: %.api
- @echo " JSON APIGEN " $@ ; \
+ @echo " JSON API" $@ ; \
mkdir -p `dirname $@` ; \
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
- | vppapigen --input - --json $@
+ | vppapigen --input - --json $@ > /dev/null
+++ /dev/null
-AC_INIT(g2, 3.0)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_CHECK_LIB([vppinfra], [clib_mem_get_page_size],,
- AC_MSG_ERROR([Please install the vpp-lib package]))
-AC_CHECK_HEADER([vppinfra/clib.h],,
- AC_MSG_ERROR([Please install the vpp-dev package]))
-
-PKG_CHECK_MODULES(g2, gtk+-2.0)
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-AC_INIT(perftool, 2.0)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_CHECK_LIB([vppinfra], [clib_mem_get_page_size],,
- AC_MSG_ERROR([Please install the vpp-lib package]))
-AC_CHECK_HEADER([vppinfra/clib.h],,
- AC_MSG_ERROR([Please install the vpp-dev package]))
-
-AM_PROG_LIBTOOL
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-# -*- Autoconf -*-
-# Copyright (c) 2008 by cisco Systems, Inc.
-# All rights reserved.
-# Process this file with autoconf to produce a configure script.
-
-AC_INIT(vppapigen, 1.0)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_YACC
-
-AC_OUTPUT([Makefile])
--- /dev/null
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS = -I m4
+
+AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} \
+ -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
+ -I@top_srcdir@/plugins -I@top_builddir@/plugins
+
+AM_LDFLAGS = -module -shared -avoid-version -rpath /none -no-undefined
+
+BUILT_SOURCES =
+bin_PROGRAMS =
+noinst_LTLIBRARIES =
+JAR_FILES =
+CLEANDIRS =
+
+#
+# jvpp-common
+#
+
+noinst_LTLIBRARIES += libjvpp_common.la
+libjvpp_common_la_SOURCES = jvpp-common/jvpp_common.c
+libjvpp_common_la_LDFLAGS =
+
+#
+# jvpp-registry (connection management + plugin registry)
+#
+
+noinst_LTLIBRARIES += libjvpp_registry.la
+
+libjvpp_registry_la_SOURCES = jvpp-registry/jvpp_registry.c
+libjvpp_registry_la_CPPFLAGS = -Ijvpp-registry
+libjvpp_registry_la_LIBAD = libjvpp_common.la
+
+packagedir_jvpp_registry = io/fd/vpp/jvpp
+jvpp_registry_src_files := \
+ $(wildcard @srcdir@/jvpp-registry/$(packagedir_jvpp_registry)/*.java) \
+ $(wildcard @srcdir@/jvpp-registry/$(packagedir_jvpp_registry)/**/*.java)
+
+BUILT_SOURCES += jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h
+CLEANDIRS += jvpp-registry/target
+JAR_FILES += jvpp-registry-$(PACKAGE_VERSION).jar
+
+jvpp_registry_ok = jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h
+
+jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h: $(jvpp_registry_src_files)
+ @echo " JAPIGEN $@"
+ @rm -rf jvpp-registry/target
+ @mkdir -p jvpp-registry/target
+ @$(JAVAC) -d jvpp-registry/target $^
+ @$(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.VppJNIConnection
+ @$(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.JVppRegistryImpl
+ @touch jvpp-registry.ok
+
+define japigen
+ @echo " JAPIGEN $@"
+ @rm -rf jvpp-$(1)/target
+ @ @srcdir@/jvpp/gen/jvpp_gen.py --plugin_name $(1) --root_dir jvpp-$(1) \
+ -i $(jvpp_$(1)_json_files) > /dev/null
+ @find jvpp-$(1)/target -name \*.java > jvpp-$(1).files
+ @$(JAVAC) -classpath jvpp-registry/target \
+ -d jvpp-$(1)/target @jvpp-$(1).files
+ @$(JAVAH) -force \
+ -classpath jvpp-registry/target:jvpp-$(1)/target \
+ -d jvpp-$(1) io.fd.vpp.jvpp.$(1).$(2)
+endef
+
+#
+# jvpp-core (Java wrapper for vpe.api)
+#
+noinst_LTLIBRARIES += libjvpp_core.la
+libjvpp_core_la_SOURCES = jvpp-core/jvpp_core.c jvpp-core/jvpp_core_gen.h
+libjvpp_core_la_CPPFLAGS = -Ijvpp-registry -Ijvpp-core
+BUILT_SOURCES += jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h
+
+JAR_FILES += jvpp-core-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-core/target
+jvpp_core_json_files = $(shell find @top_builddir@/vnet/ -type f -name '*.api.json')
+
+jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h: $(jvpp_registry_ok) $(jvpp_core_json_files)
+ $(call japigen,core,JVppCoreImpl)
+
+#
+# ACL Plugin
+#
+if ENABLE_ACL_PLUGIN
+noinst_LTLIBRARIES += libjvpp_acl.la
+libjvpp_acl_la_SOURCES = jvpp-acl/jvpp_acl.c
+libjvpp_acl_la_CPPFLAGS = -Ijvpp-acl
+
+BUILT_SOURCES += jvpp-acl/io_fd_vpp_jvpp_acl_JVppAclImpl.h
+
+JAR_FILES += jvpp-acl-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-acl/target
+
+jvpp_acl_json_files = @top_builddir@/plugins/acl/acl.api.json
+
+jvpp-acl/io_fd_vpp_jvpp_acl_JVppAclImpl.h: $(jvpp_registry_ok) $(jvpp_acl_json_files)
+ $(call japigen,acl,JVppAclImpl)
+endif
+
+#
+# SNAT Plugin
+#
+if ENABLE_SNAT_PLUGIN
+noinst_LTLIBRARIES += libjvpp_snat.la
+libjvpp_snat_la_SOURCES = jvpp-snat/jvpp_snat.c
+libjvpp_snat_la_CPPFLAGS = -Ijvpp-snat
+
+BUILT_SOURCES += jvpp-snat/io_fd_vpp_jvpp_snat_JVppSnatImpl.h
+
+JAR_FILES += jvpp-snat-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-snat/target
+
+jvpp_snat_json_files = @top_builddir@/plugins/snat/snat.api.json
+
+jvpp-snat/io_fd_vpp_jvpp_snat_JVppSnatImpl.h: $(jvpp_registry_ok) $(jvpp_snat_json_files)
+ $(call japigen,snat,JVppSnatImpl)
+endif
+
+#
+# iOAM Trace Plugin
+#
+if ENABLE_IOAM_PLUGIN
+noinst_LTLIBRARIES += libjvpp_ioamtrace.la
+libjvpp_ioamtrace_la_SOURCES = jvpp-ioamtrace/jvpp_ioam_trace.c
+
+BUILT_SOURCES += jvpp-ioamtrace/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h
+JAR_FILES += jvpp-ioamtrace-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-ioamtrace/target
+
+jvpp_ioamtrace_json_files = @top_builddir@/plugins/ioam/lib-trace/trace.api.json
+
+jvpp-ioamtrace/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h: $(jvpp_registry_ok) $(jvpp_ioamtrace_json_files)
+ $(call japigen,ioamtrace,JVppIoamtraceImpl)
+
+#
+# iOAM POT Plugin
+#
+noinst_LTLIBRARIES += libjvpp_ioampot.la
+libjvpp_ioampot_la_SOURCES = jvpp-ioampot/jvpp_ioam_pot.c
+
+BUILT_SOURCES += jvpp-ioampot/io_fd_vpp_jvpp_ioampot_JVppIoampotImpl.h
+JAR_FILES += jvpp-ioampot-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-ioampot/target
+
+jvpp_ioampot_json_files = @top_builddir@/plugins/ioam/lib-pot/pot.api.json
+
+jvpp-ioampot/io_fd_vpp_jvpp_ioampot_JVppIoampotImpl.h: $(jvpp_registry_ok) $(jvpp_ioampot_json_files)
+ $(call japigen,ioampot,JVppIoampotImpl)
+
+#
+# iOAM Export Plugin
+#
+noinst_LTLIBRARIES += libjvpp_ioamexport.la
+libjvpp_ioamexport_la_SOURCES = jvpp-ioamexport/jvpp_ioam_export.c
+
+BUILT_SOURCES += jvpp-ioamexport/io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl.h
+JAR_FILES += jvpp-ioamexport-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-ioamexport/target
+
+jvpp_ioamexport_json_files = @top_builddir@/plugins/ioam/export/ioam_export.api.json
+
+jvpp-ioamexport/io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl.h: $(jvpp_registry_ok) $(jvpp_ioamexport_json_files)
+ $(call japigen,ioamexport,JVppIoamexportImpl)
+endif
+
+#
+# JAR creation
+#
+jvpp-%-$(PACKAGE_VERSION).jar: libjvpp_%.la
+ @echo " JAR $@"
+ @cp .libs/libjvpp_$*.so jvpp-$*/target
+ @$(JAR) cf $(JARFLAGS) $@ -C jvpp-$*/target .
+
+jardir = $(prefix)/share/java
+jar_DATA = $(JAR_FILES)
+
+all-local: $(JAR_FILES)
+
+#
+# Cleanup
+#
+CLEANFILES = jvpp-registry.ok $(JAR_FILES) $(BUILT_SOURCES)
+
+clean-local:
+ rm -rf $(CLEANDIRS)
#include <jvpp-common/jvpp_common.h>
-#include "acl/jvpp/io_fd_vpp_jvpp_acl_JVppAclImpl.h"
+#include "jvpp-acl/io_fd_vpp_jvpp_acl_JVppAclImpl.h"
#include "jvpp_acl.h"
-#include "acl/jvpp/jvpp_acl_gen.h"
+#include "jvpp-acl/jvpp_acl_gen.h"
/*
* Class: io_fd_vpp_jvpp_acl_JVppaclImpl
#include <jvpp-common/jvpp_common.h>
-#include "ioam/jvpp/io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl.h"
+#include "jvpp-ioamexport/io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl.h"
#include "jvpp_ioam_export.h"
-#include "ioam/jvpp/jvpp_ioam_export_gen.h"
+#include "jvpp-ioamexport/jvpp_ioamexport_gen.h"
/*
* Class: io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl
#include <jvpp-common/jvpp_common.h>
-#include "ioam/jvpp/io_fd_vpp_jvpp_ioampot_JVppIoampotImpl.h"
+#include "jvpp-ioampot/io_fd_vpp_jvpp_ioampot_JVppIoampotImpl.h"
#include "jvpp_ioam_pot.h"
-#include "ioam/jvpp/jvpp_ioam_pot_gen.h"
+#include "jvpp-ioampot/jvpp_ioampot_gen.h"
/*
* Class: io_fd_vpp_jvpp_ioampot_JVppIoampotImpl
#include <jvpp-common/jvpp_common.h>
-#include "ioam/jvpp/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h"
+#include "jvpp-ioamtrace/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h"
#include "jvpp_ioam_trace.h"
-#include "ioam/jvpp/jvpp_ioam_trace_gen.h"
+#include "jvpp-ioamtrace/jvpp_ioamtrace_gen.h"
/*
* Class: io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl
private static final Logger LOG = Logger.getLogger(VppJNIConnection.class.getName());
static {
- final String libName = "libjvpp_registry.so.0.0.0";
+ final String libName = "libjvpp_registry.so";
try {
loadLibrary(libName, VppJNIConnection.class);
} catch (IOException e) {
#include <jvpp-common/jvpp_common.h>
-#include "snat/jvpp/io_fd_vpp_jvpp_snat_JVppSnatImpl.h"
+#include "jvpp-snat/io_fd_vpp_jvpp_snat_JVppSnatImpl.h"
#include "jvpp_snat.h"
-#include "snat/jvpp/jvpp_snat_gen.h"
+#include "jvpp-snat/jvpp_snat_gen.h"
/*
* Class: io_fd_vpp_jvpp_snat_JVppsnatImpl
parser = argparse.ArgumentParser(description='VPP Java API generator')
parser.add_argument('-i', action="store", dest="inputfiles", nargs='+')
parser.add_argument('--plugin_name', action="store", dest="plugin_name")
+parser.add_argument('--root_dir', action="store", dest="root_dir")
args = parser.parse_args()
sys.path.append(".")
+cwd = os.getcwd()
print "Generating Java API for %s" % args.inputfiles
print "inputfiles %s" % args.inputfiles
cfg = {}
+base_package = 'io.fd.vpp.jvpp'
+plugin_package = base_package + '.' + plugin_name
+root_dir = os.path.abspath(args.root_dir)
+print "root_dir %s" % root_dir
+work_dir = root_dir + "/target/" + plugin_package.replace(".","/")
+
+try:
+ os.makedirs(work_dir)
+except OSError:
+ if not os.path.isdir(work_dir):
+ raise
+
+os.chdir(work_dir)
+
for inputfile in args.inputfiles:
if any(substring in inputfile for substring in blacklist):
print "WARNING: Imput file %s blacklisted" % inputfile
continue
- _cfg = json.load(open(inputfile, 'r'))
+ _cfg = json.load(open(cwd + "/" + inputfile, 'r'))
if 'types' in cfg:
cfg['types'].extend(_cfg['types'])
else:
return func_list, func_name
-base_package = 'io.fd.vpp.jvpp'
-plugin_package = base_package + '.' + plugin_name
types_package = 'types'
dto_package = 'dto'
callback_package = 'callback'
jvpp_impl_gen.generate_jvpp(func_list, base_package, plugin_package, plugin_name, dto_package, args.inputfiles)
callback_gen.generate_callbacks(func_list, base_package, plugin_package, plugin_name.title(), callback_package, dto_package, args.inputfiles)
notification_gen.generate_notification_registry(func_list, base_package, plugin_package, plugin_name.title(), notification_package, callback_package, dto_package, args.inputfiles)
-jvpp_c_gen.generate_jvpp(func_list, plugin_name, args.inputfiles)
+jvpp_c_gen.generate_jvpp(func_list, plugin_name, args.inputfiles, root_dir)
jvpp_future_facade_gen.generate_jvpp(func_list, base_package, plugin_package, plugin_name.title(), dto_package, callback_package, notification_package, future_package, args.inputfiles)
jvpp_callback_facade_gen.generate_jvpp(func_list, base_package, plugin_package, plugin_name.title(), dto_package, callback_package, notification_package, callback_facade_package, args.inputfiles)
print "Generating Callback interfaces"
if not os.path.exists(callback_package):
- raise Exception("%s folder is missing" % callback_package)
+ os.mkdir(callback_package)
callbacks = []
for func in func_list:
print "Generating DTOs"
if not os.path.exists(dto_package):
- raise Exception("%s folder is missing" % dto_package)
+ os.mkdir(dto_package)
for func in func_list:
camel_case_dto_name = util.underscore_to_camelcase_upper(func['name'])
$handler_registration
""")
-def generate_jvpp(func_list, plugin_name, inputfile):
+def generate_jvpp(func_list, plugin_name, inputfile, path):
""" Generates jvpp C file """
print "Generating jvpp C"
msg_handlers = generate_msg_handlers(func_list, plugin_name, inputfile)
handler_registration = generate_handler_registration(func_list)
- jvpp_c_file = open("jvpp_%s_gen.h" % plugin_name, 'w')
+ jvpp_c_file = open("%s/jvpp_%s_gen.h" % (path, plugin_name), 'w')
jvpp_c_file.write(jvpp_c_template.substitute(
inputfile=inputfile,
class_cache=class_cache,
print "Generating JVpp future facade"
if not os.path.exists(future_facade_package):
- raise Exception("%s folder is missing" % future_facade_package)
+ os.mkdir(future_facade_package)
methods = []
methods_impl = []
public final class JVpp${plugin_name}Impl implements $plugin_package.JVpp${plugin_name} {
private final static Logger LOG = Logger.getLogger(JVpp${plugin_name}Impl.class.getName());
- private static final String LIBNAME = "libjvpp_${plugin_name_underscore}.so.0.0.0";
+ private static final String LIBNAME = "libjvpp_${plugin_name_underscore}.so";
// FIXME using NativeLibraryLoader makes load fail could not find (WantInterfaceEventsReply).
static {
print "Generating Notification interfaces and implementation"
if not os.path.exists(notification_package):
- raise Exception("%s folder is missing" % notification_package)
+ os.mkdir(notification_package)
callbacks = []
register_callback_methods = []
print "Generating custom types"
if not os.path.exists(types_package):
- raise Exception("%s folder is missing" % types_package)
+ os.mkdir(types_package)
for type in types_list:
c_type_name = type['name']
endif
vpp_plugin_configure:
- @echo "PLUGIN CONFIGURE " $@
+ @echo "PLUGIN CFG" $@
@echo "#!/bin/bash" > $@
@echo " " >> $@
@echo "set +eu" >> $@
BUILT_SOURCES += tools/vppapigen/gram.h
tools/vppapigen/gram.h: tools/vppapigen/gram.y
- $(YACC) -d @srcdir@/tools/vppapigen/gram.y
- mv y.tab.h tools/vppapigen/gram.h
- rm y.tab.c
+ @$(YACC) -d @srcdir@/tools/vppapigen/gram.y
+ @mv y.tab.h tools/vppapigen/gram.h
+ @rm y.tab.c
vppapigen_SOURCES = tools/vppapigen/gram.y tools/vppapigen/lex.c tools/vppapigen/node.c
vppapigen_LDADD = libvppinfra.la
+++ /dev/null
-AUTOMAKE_OPTIONS = foreign
-SUBDIRS = java
-
-# vi:syntax=automake
+++ /dev/null
-AC_INIT(vpp-api, 1.1.0)
-LT_INIT
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SUBDIRS([java])
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-
+++ /dev/null
-# Copyright (c) 2015 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-AUTOMAKE_OPTIONS = foreign subdir-objects
-ACLOCAL_AMFLAGS = -I m4
-AM_CFLAGS = -Wall
-
-noinst_PROGRAMS =
-BUILT_SOURCES =
-bin_PROGRAMS =
-CLEANFILES =
-lib_LTLIBRARIES =
-
-#
-# jvpp-common
-#
-
-nobase_include_HEADERS = \
- jvpp-common/jvpp_common.h
-
-lib_LTLIBRARIES += libjvpp_common.la
-
-libjvpp_common_la_SOURCES = jvpp-common/jvpp_common.c
-libjvpp_common_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
- -lpthread -lm -lrt
-libjvpp_common_la_LDFLAGS = -module
-libjvpp_common_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-
-
-#
-# jvpp-registry (connection management + plugin registry)
-#
-lib_LTLIBRARIES += libjvpp_registry.la
-
-libjvpp_registry_la_SOURCES = jvpp-registry/jvpp_registry.c
-libjvpp_registry_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
- -lpthread -lm -lrt -ljvpp_common
-libjvpp_registry_la_LDFLAGS = -module
-libjvpp_registry_la_CPPFLAGS = -Ijvpp-registry -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-EXTRA_libjvpp_registry_la_DEPENDENCIES=libjvpp_common.la
-
-jarfile_jvpp_registry = jvpp-registry-$(PACKAGE_VERSION).jar
-packagedir_jvpp_registry = io/fd/vpp/jvpp
-
-BUILT_SOURCES += jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h
-
-jvpp_registry_src_files := $(wildcard @srcdir@/jvpp-registry/$(packagedir_jvpp_registry)/*.java) $(wildcard @srcdir@/jvpp-registry/$(packagedir_jvpp_registry)/**/*.java)
-
-jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h: $(jvpp_registry_src_files)
- @echo " jvpp-registry.jar generation"
- mkdir -p jvpp-registry/target
- $(JAVAC) -d jvpp-registry/target $(jvpp_registry_src_files)
- $(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.VppJNIConnection
- $(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.JVppRegistryImpl
-
-$(jarfile_jvpp_registry): libjvpp_registry.la
- cp .libs/libjvpp_registry.so.0.0.0 jvpp-registry/target; \
- $(JAR) cf $(JARFLAGS) $@ -C jvpp-registry/target .;
-
-#
-# jvpp-core (Java wrapper for vpe.api)
-#
-lib_LTLIBRARIES += libjvpp_core.la
-
-libjvpp_core_la_SOURCES = jvpp-core/jvpp_core.c jvpp-core/jvpp_core_gen.h
-libjvpp_core_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
- -lpthread -lm -lrt -ljvpp_common
-libjvpp_core_la_LDFLAGS = -module
-libjvpp_core_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-
-jarfile_jvpp_core = jvpp-core-$(PACKAGE_VERSION).jar
-packagedir_jvpp_core = io/fd/vpp/jvpp/core
-
-BUILT_SOURCES += jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h
-
-JSON_FILES = \
- $(wildcard $(prefix)/../vpp/share/vpp/api/core/*.api.json)
-
-jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h: \
- jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h \
- $(JSON_FILES)
- cp -rf @srcdir@/jvpp-core/* -t jvpp-core/
- mkdir -p jvpp-core/target
- cd jvpp-core \
- && mkdir -p types dto future callfacade callback notification \
- && @srcdir@/jvpp/gen/jvpp_gen.py --plugin_name core \
- -i $(JSON_FILES) \
- && cp -rf types dto future callfacade callback notification *.java -t $(packagedir_jvpp_core) \
- && rm -rf types dto future callfacade callback notification *.java
-
- $(JAVAC) -classpath jvpp-registry/target -d jvpp-core/target jvpp-core/$(packagedir_jvpp_core)/*.java \
- jvpp-core/$(packagedir_jvpp_core)/types/*.java \
- jvpp-core/$(packagedir_jvpp_core)/dto/*.java \
- jvpp-core/$(packagedir_jvpp_core)/callback/*.java \
- jvpp-core/$(packagedir_jvpp_core)/notification/*.java \
- jvpp-core/$(packagedir_jvpp_core)/future/*.java \
- jvpp-core/$(packagedir_jvpp_core)/callfacade/*.java \
- jvpp-core/$(packagedir_jvpp_core)/test/*.java \
- || (echo "jvpp-core compilation failed: $$?"; exit 1)
- $(JAVAH) -force -classpath jvpp-registry/target:jvpp-core/target -d jvpp-core io.fd.vpp.jvpp.core.JVppCoreImpl
-
-$(jarfile_jvpp_core): libjvpp_core.la
- cp .libs/libjvpp_core.so.0.0.0 jvpp-core/target
- $(JAR) cf $(JARFLAGS) $@ -C jvpp-core/target .
-
-all-local: $(jarfile_jvpp_registry) $(jarfile_jvpp_core)
+++ /dev/null
-AC_INIT(jvpp, 17.04)
-LT_INIT
-AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
- JAVAC=${JAVA_HOME}/bin/javac
- PATH=${JAVA_HOME}/bin/:${PATH}
- break
-fi
-
-AX_CHECK_JAVA_HOME
-AX_PROG_JAVAC
-AX_PROG_JAVAH
-AX_PROG_JAR
-AX_PROG_JAVADOC
-AX_PROG_JAVA
-
-AC_OUTPUT([Makefile])
-
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_java_home.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_JAVA_HOME
-#
-# DESCRIPTION
-#
-# Check for Sun Java (JDK / JRE) installation, where the 'java' VM is in.
-# If found, set environment variable JAVA_HOME = Java installation home,
-# else left JAVA_HOME untouch, which in most case means JAVA_HOME is
-# empty.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Gleen Salmon <gleensalmon@yahoo.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 6
-
-AU_ALIAS([AC_CHECK_JAVA_HOME], [AX_CHECK_JAVA_HOME])
-
-AC_DEFUN([AX_CHECK_JAVA_HOME],
-[AC_MSG_CHECKING([for JAVA_HOME])
-# We used a fake loop so that we can use "break" to exit when the result
-# is found.
-while true
-do
- # If the user defined JAVA_HOME, don't touch it.
- test "${JAVA_HOME+set}" = set && break
-
- # On Mac OS X 10.5 and following, run /usr/libexec/java_home to get
- # the value of JAVA_HOME to use.
- # (http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html).
- JAVA_HOME=`/usr/libexec/java_home 2>/dev/null`
- test x"$JAVA_HOME" != x && break
-
- # See if we can find the java executable, and compute from there.
- TRY_JAVA_HOME=`ls -dr /usr/java/* 2> /dev/null | head -n 1`
- if test x$TRY_JAVA_HOME != x; then
- PATH=$PATH:$TRY_JAVA_HOME/bin
- fi
- AC_PATH_PROG([JAVA_PATH_NAME], [java])
- if test "x$JAVA_PATH_NAME" != x; then
- JAVA_HOME=`echo $JAVA_PATH_NAME | sed "s/\(.*\)[[/]]bin[[/]]java.*/\1/"`
- break
- fi
-
- AC_MSG_NOTICE([Could not compute JAVA_HOME])
- break
-done
-AC_MSG_RESULT([$JAVA_HOME])
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_java_plugin.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_JAVA_PLUGIN(<shell-variable>)
-#
-# DESCRIPTION
-#
-# This macro sets <shell-variable> to empty on failure and to a compatible
-# version of plugin.jar otherwise. Directories searched are /usr/java/*
-# and /usr/local/java/*, which are assumed to be j{dk,re} installations.
-# Apply the shell variable as you see fit. If sun changes things so
-# <jre>/lib/plugin.jar is not the magic file it will stop working.
-#
-# This macro assumes that unzip, zipinfo or pkzipc is available (and can
-# list the contents of the jar archive). The first two are assumed to work
-# similarly enough to the infozip versisonms. The pkzipc version is
-# assumed to work if I undertstand the documentation on pkware's site but
-# YMMV. I do not have access to pwkware's version to test it.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Duncan Simpson <dps@simpson.demon.co.uk>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 7
-
-AU_ALIAS([DPS_CHECK_PLUGIN], [AX_CHECK_JAVA_PLUGIN])
-AC_DEFUN([AX_CHECK_JAVA_PLUGIN],
-[AC_REQUIRE([AC_PROG_AWK])
-AC_REQUIRE([AC_PROG_FGREP])
-AC_CHECK_PROG(ZIPINFO,[zipinfo unzip pkzipc])
-AC_MSG_CHECKING([for the java plugin])
-case "x$ZIPINFO" in
-[*/zipinfo)]
- zipinf="zipinfo -1" ;;
-[*/unzip)]
- zipinf="unzip -l";;
-[*/pkzipc)]
- ziping="unzipc -view";;
-[x*)]
- AC_MSG_RESULT([skiped, none of zipinfo, unzip and pkzipc found])
- AC_SUBST($1,[])
- zipinf="";;
-esac
-if test "x$zipinf" != "x"; then
-jplugin=""
-for jhome in `ls -dr /usr/java/* /usr/local/java/* 2> /dev/null`; do
-for jfile in lib/plugin.jar jre/lib/plugin.jar; do
-if test "x$jplugin" = "x" && test -f "$jhome/$jfile"; then
-eval "$zipinf $jhome/$jfile | $AWK '{ print \$NF; }' | $FGREP netscape/javascript/JSObject" >/dev/null 2>/dev/null
-if test $? -eq 0; then
-dnl Some version of gcj (and javac) refuse to work with some files
-dnl that pass this test. To stop this problem make sure that the compiler
-dnl still works with this jar file in the classpath
-cat << \EOF > Test.java
-/* [#]line __oline__ "configure" */
-public class Test {
-}
-EOF
-if eval "$JAVAC -classpath $jhome/$jfile Test.java 2>/dev/null >/dev/null" && test -f Test.class; then
-jplugin="$jhome/$jfile"
-fi
-rm -f Test.java Test.class
-fi; fi; done; done
-if test "x$jplugin" != "x"; then
-AC_SUBST($1,$jplugin)
-AC_MSG_RESULT($jplugin)
-else
-AC_MSG_RESULT([java plugin not found])
-AC_SUBST($1,[])
-fi
-fi
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_java_check_class.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_JAVA_CHECK_CLASS(<class>,<action-if-found>,<action-if-not-found>)
-#
-# DESCRIPTION
-#
-# Test if a Java class is available. Based on AX_PROG_JAVAC_WORKS. This
-# version uses a cache variable which is both compiler, options and
-# classpath dependent (so if you switch from javac to gcj it correctly
-# notices and redoes the test).
-#
-# The macro tries to compile a minimal program importing <class>. Some
-# newer compilers moan about the failure to use this but fail or produce a
-# class file anyway. All moaing is sunk to /dev/null since I only wanted
-# to know if the class could be imported. This is a recommended followup
-# to AX_CHECK_JAVA_PLUGIN with classpath appropriately adjusted.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Duncan Simpson <dps@simpson.demon.co.uk>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 9
-
-AU_ALIAS([DPS_JAVA_CHECK_CLASS], [AX_JAVA_CHECK_CLASS])
-AC_DEFUN([AX_JAVA_CHECK_CLASS],[
-m4_define([cache_val],[m4_translit(ax_cv_have_java_class_$1, " ." ,"__")])
-if test "x$CLASSPATH" != "x"; then
-xtra=" with classpath ${CLASSPATH}"
-xopts=`echo ${CLASSPATH} | ${SED} 's/^ *://'`
-xopts="-classpath $xopts"
-else xtra=""; xopts=""; fi
-cache_var="cache_val"AS_TR_SH([_Jc_${JAVAC}_Cp_${CLASSPATH}])
-AC_CACHE_CHECK([if the $1 class is available$xtra], [$cache_var], [
-JAVA_TEST=Test.java
-CLASS_TEST=Test.class
-cat << \EOF > $JAVA_TEST
-/* [#]xline __oline__ "configure" */
-import $1;
-public class Test {
-}
-EOF
-if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $xopts $JAVA_TEST) >/dev/null 2>&1; then
- eval "${cache_var}=yes"
-else
- eval "${cache_var}=no"
- echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
- cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
-fi
-rm -f $JAVA_TEST $CLASS_TEST
-])
-if eval 'test "x$'${cache_var}'" = "xyes"'; then
-$2
-true; else
-$3
-false; fi])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_java_options.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_JAVA_OPTIONS
-#
-# DESCRIPTION
-#
-# AX_JAVA_OPTIONS adds configure command line options used for Java m4
-# macros. This Macro is optional.
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission. The
-# general documentation, as well as the sample configure.in, is included
-# in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Devin Weaver <ktohg@tritarget.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 6
-
-AU_ALIAS([AC_JAVA_OPTIONS], [AX_JAVA_OPTIONS])
-AC_DEFUN([AX_JAVA_OPTIONS],[
-AC_ARG_WITH(java-prefix,
- [ --with-java-prefix=PFX prefix where Java runtime is installed (optional)])
-AC_ARG_WITH(javac-flags,
- [ --with-javac-flags=FLAGS flags to pass to the Java compiler (optional)])
-AC_ARG_WITH(java-flags,
- [ --with-java-flags=FLAGS flags to pass to the Java VM (optional)])
-JAVAPREFIX=$with_java_prefix
-JAVACFLAGS=$with_javac_flags
-JAVAFLAGS=$with_java_flags
-AC_SUBST(JAVAPREFIX)dnl
-AC_SUBST(JAVACFLAGS)dnl
-AC_SUBST(JAVAFLAGS)dnl
-AC_SUBST(JAVA)dnl
-AC_SUBST(JAVAC)dnl
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_libgcj_jar.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_LIBGCJ_JAR
-#
-# DESCRIPTION
-#
-# Locate libgcj.jar so you can place it before everything else when using
-# gcj.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Duncan Simpson <dps@simpson.demon.co.uk>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 9
-
-AU_ALIAS([DPS_LIBGCJ_JAR], [AX_LIBGCJ_JAR])
-AC_DEFUN([AX_LIBGCJ_JAR],
-[
-AC_REQUIRE([AC_EXEEXT])
-AC_REQUIRE([AX_PROG_JAVAC])
-AC_REQUIRE([AC_PROG_FGREP])
-AC_PROG_SED
-if test "x$SED" = "x"; then
-AC_MSG_WARN([sed not avaiable, so libgcj.jar test skipped])
-else
-AC_MSG_CHECKING([if $JAVAC is gcj]);
-jc=`eval "[echo x$JAVAC | $SED 's/^x.*\\/\\([^/]*\\)\$/x\\1/;s/^ *\\([^ ]*\\) .*$/\\1/;s/"$EXEEXT"$//']"`
-if test "x$jc" != "xxgcj"; then
-AC_MSG_RESULT(no)
-else
-AC_MSG_RESULT(yes)
-AC_MSG_CHECKING([libgcj.jar location])
-save_cp="$CLASSPATH";
-unset CLASSPATH;
-AC_MSG_CHECKING([gcj default classpath])
-cat << \EOF > Test.java
-/* [#]line __oline__ "configure" */
-public class Test {
-}
-EOF
-lgcj=`eval "[$JAVAC -v -C Test.java 2>&1 | $FGREP \\(system\\) | $SED 's/^ *\\([^ ]*\\) .*$/\\1/;s/\\.jar\\//.jar/']"`;
-if test -f Test.class && test "x$lgcj" != "x"; then
-AC_MSG_RESULT($lgcj)
-$1="$lgcj:"
-else
-AC_MSG_RESULT(failed)
-$1=""
-fi
-if test "x$save_cp" != "x"; then CLASSPATH="$save_cp"; fi
-rm -f Test.java Test.class
-fi
-fi
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_jar.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAR
-#
-# DESCRIPTION
-#
-# AX_PROG_JAR tests for an existing jar program. It uses the environment
-# variable JAR then tests in sequence various common jar programs.
-#
-# If you want to force a specific compiler:
-#
-# - at the configure.in level, set JAR=yourcompiler before calling
-# AX_PROG_JAR
-#
-# - at the configure level, setenv JAR
-#
-# You can use the JAR variable in your Makefile.in, with @JAR@.
-#
-# Note: This macro depends on the autoconf M4 macros for Java programs. It
-# is VERY IMPORTANT that you download that whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission.
-#
-# The general documentation of those macros, as well as the sample
-# configure.in, is included in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Egon Willighagen <e.willighagen@science.ru.nl>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 7
-
-AU_ALIAS([AC_PROG_JAR], [AX_PROG_JAR])
-AC_DEFUN([AX_PROG_JAR],[
-AS_IF([test "x$JAVAPREFIX" = x],
- [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar])],
- [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar], [], [$JAVAPREFIX/bin])])
-test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
-AC_PROVIDE([$0])dnl
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_java.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVA
-#
-# DESCRIPTION
-#
-# Here is a summary of the main macros:
-#
-# AX_PROG_JAVAC: finds a Java compiler.
-#
-# AX_PROG_JAVA: finds a Java virtual machine.
-#
-# AX_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!).
-#
-# AX_CHECK_RQRD_CLASS: finds if we have the given class and stops
-# otherwise.
-#
-# AX_TRY_COMPILE_JAVA: attempt to compile user given source.
-#
-# AX_TRY_RUN_JAVA: attempt to compile and run user given source.
-#
-# AX_JAVA_OPTIONS: adds Java configure options.
-#
-# AX_PROG_JAVA tests an existing Java virtual machine. It uses the
-# environment variable JAVA then tests in sequence various common Java
-# virtual machines. For political reasons, it starts with the free ones.
-# You *must* call [AX_PROG_JAVAC] before.
-#
-# If you want to force a specific VM:
-#
-# - at the configure.in level, set JAVA=yourvm before calling AX_PROG_JAVA
-#
-# (but after AC_INIT)
-#
-# - at the configure level, setenv JAVA
-#
-# You can use the JAVA variable in your Makefile.in, with @JAVA@.
-#
-# *Warning*: its success or failure can depend on a proper setting of the
-# CLASSPATH env. variable.
-#
-# TODO: allow to exclude virtual machines (rationale: most Java programs
-# cannot run with some VM like kaffe).
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission.
-#
-# A Web page, with a link to the latest CVS snapshot is at
-# <http://www.internatif.org/bortzmeyer/autoconf-Java/>.
-#
-# This is a sample configure.in Process this file with autoconf to produce
-# a configure script.
-#
-# AC_INIT(UnTag.java)
-#
-# dnl Checks for programs.
-# AC_CHECK_CLASSPATH
-# AX_PROG_JAVAC
-# AX_PROG_JAVA
-#
-# dnl Checks for classes
-# AX_CHECK_RQRD_CLASS(org.xml.sax.Parser)
-# AX_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver)
-#
-# AC_OUTPUT(Makefile)
-#
-# LICENSE
-#
-# Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 9
-
-AU_ALIAS([AC_PROG_JAVA], [AX_PROG_JAVA])
-AC_DEFUN([AX_PROG_JAVA],[
-m4_define([m4_ax_prog_java_list], [kaffe java])dnl
-AS_IF([test "x$JAVAPREFIX" = x],
- [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list])],
- [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list], [], [$JAVAPREFIX/bin])])
-test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])
-m4_undefine([m4_ax_prog_java_list])dnl
-AX_PROG_JAVA_WORKS
-AC_PROVIDE([$0])dnl
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_java_cc.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVA_CC
-#
-# DESCRIPTION
-#
-# Finds the appropriate java compiler on your path. By preference the java
-# compiler is gcj, then jikes then javac.
-#
-# The macro can take one argument specifying a space separated list of
-# java compiler names.
-#
-# For example:
-#
-# AX_PROG_JAVA_CC(javac, gcj)
-#
-# The macro also sets the compiler options variable: JAVA_CC_OPTS to
-# something sensible:
-#
-# - for GCJ it sets it to: @GCJ_OPTS@
-# (if GCJ_OPTS is not yet defined then it is set to "-C")
-#
-# - no other compiler has applicable options yet
-#
-# Here's an example configure.in:
-#
-# AC_INIT(Makefile.in)
-# AX_PROG_JAVA_CC()
-# AC_OUTPUT(Makefile)
-# dnl End.
-#
-# And here's the start of the Makefile.in:
-#
-# PROJECT_ROOT := @srcdir@
-# # Tool definitions.
-# JAVAC := @JAVA_CC@
-# JAVAC_OPTS := @JAVA_CC_OPTS@
-# JAR_TOOL := @jar_tool@
-#
-# LICENSE
-#
-# Copyright (c) 2008 Nic Ferrier <nferrier@tapsellferrier.co.uk>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 4
-
-# AX_PROG_JAVA_CC([COMPILER ...])
-# --------------------------
-# COMPILER ... is a space separated list of java compilers to search for.
-# This just gives the user an opportunity to specify an alternative
-# search list for the java compiler.
-AU_ALIAS([AC_PROG_JAVA_CC], [AX_PROG_JAVA_CC])
-AC_DEFUN([AX_PROG_JAVA_CC],
-[AC_ARG_VAR([JAVA_CC], [java compiler command])dnl
-AC_ARG_VAR([JAVA_CC_FLAGS], [java compiler flags])dnl
-m4_ifval([$1],
- [AC_CHECK_TOOLS(JAVA_CC, [$1])],
-[AC_CHECK_TOOL(JAVA_CC, gcj)
-if test -z "$JAVA_CC"; then
- AC_CHECK_TOOL(JAVA_CC, javac)
-fi
-if test -z "$JAVA_CC"; then
- AC_CHECK_TOOL(JAVA_CC, jikes)
-fi
-])
-
-if test "$JAVA_CC" = "gcj"; then
- if test "$GCJ_OPTS" = ""; then
- AC_SUBST(GCJ_OPTS,-C)
- fi
- AC_SUBST(JAVA_CC_OPTS, @GCJ_OPTS@,
- [Define the compilation options for GCJ])
-fi
-test -z "$JAVA_CC" && AC_MSG_ERROR([no acceptable java compiler found in \$PATH])
-])# AX_PROG_JAVA_CC
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_java_works.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVA_WORKS
-#
-# DESCRIPTION
-#
-# Internal use ONLY.
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission. The
-# general documentation, as well as the sample configure.in, is included
-# in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 9
-
-AU_ALIAS([AC_PROG_JAVA_WORKS], [AX_PROG_JAVA_WORKS])
-AC_DEFUN([AX_PROG_JAVA_WORKS], [
-AC_PATH_PROG(UUDECODE, uudecode, [no])
-if test x$UUDECODE != xno; then
-AC_CACHE_CHECK([if uudecode can decode base 64 file], ac_cv_prog_uudecode_base64, [
-dnl /**
-dnl * Test.java: used to test if java compiler works.
-dnl */
-dnl public class Test
-dnl {
-dnl
-dnl public static void
-dnl main( String[] argv )
-dnl {
-dnl System.exit (0);
-dnl }
-dnl
-dnl }
-cat << \EOF > Test.uue
-begin-base64 644 Test.class
-yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
-bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
-bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s
-YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG
-aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB
-AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB
-AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ=
-====
-EOF
-if $UUDECODE Test.uue; then
- ac_cv_prog_uudecode_base64=yes
-else
- echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AS_MESSAGE_LOG_FD
- echo "configure: failed file was:" >&AS_MESSAGE_LOG_FD
- cat Test.uue >&AS_MESSAGE_LOG_FD
- ac_cv_prog_uudecode_base64=no
-fi
-rm -f Test.uue])
-fi
-if test x$ac_cv_prog_uudecode_base64 != xyes; then
- rm -f Test.class
- AC_MSG_WARN([I have to compile Test.class from scratch])
- if test x$ac_cv_prog_javac_works = xno; then
- AC_MSG_ERROR([Cannot compile java source. $JAVAC does not work properly])
- fi
- if test x$ac_cv_prog_javac_works = x; then
- AX_PROG_JAVAC
- fi
-fi
-AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [
-JAVA_TEST=Test.java
-CLASS_TEST=Test.class
-TEST=Test
-changequote(, )dnl
-cat << \EOF > $JAVA_TEST
-/* [#]line __oline__ "configure" */
-public class Test {
-public static void main (String args[]) {
- System.exit (0);
-} }
-EOF
-changequote([, ])dnl
-if test x$ac_cv_prog_uudecode_base64 != xyes; then
- if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then
- :
- else
- echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
- cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
- AC_MSG_ERROR(The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?))
- fi
-fi
-if AC_TRY_COMMAND($JAVA -classpath . $JAVAFLAGS $TEST) >/dev/null 2>&1; then
- ac_cv_prog_java_works=yes
-else
- echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
- cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
- AC_MSG_ERROR(The Java VM $JAVA failed (see config.log, check the CLASSPATH?))
-fi
-rm -fr $JAVA_TEST $CLASS_TEST Test.uue
-])
-AC_PROVIDE([$0])dnl
-]
-)
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_javac.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVAC
-#
-# DESCRIPTION
-#
-# AX_PROG_JAVAC tests an existing Java compiler. It uses the environment
-# variable JAVAC then tests in sequence various common Java compilers. For
-# political reasons, it starts with the free ones.
-#
-# If you want to force a specific compiler:
-#
-# - at the configure.in level, set JAVAC=yourcompiler before calling
-# AX_PROG_JAVAC
-#
-# - at the configure level, setenv JAVAC
-#
-# You can use the JAVAC variable in your Makefile.in, with @JAVAC@.
-#
-# *Warning*: its success or failure can depend on a proper setting of the
-# CLASSPATH env. variable.
-#
-# TODO: allow to exclude compilers (rationale: most Java programs cannot
-# compile with some compilers like guavac).
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission. The
-# general documentation, as well as the sample configure.in, is included
-# in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 7
-
-AU_ALIAS([AC_PROG_JAVAC], [AX_PROG_JAVAC])
-AC_DEFUN([AX_PROG_JAVAC],[
-m4_define([m4_ax_prog_javac_list],["gcj -C" guavac jikes javac])dnl
-AS_IF([test "x$JAVAPREFIX" = x],
- [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list])],
- [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list], [], [$JAVAPREFIX/bin])])
-m4_undefine([m4_ax_prog_javac_list])dnl
-test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
-AX_PROG_JAVAC_WORKS
-AC_PROVIDE([$0])dnl
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_javac_works.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVAC_WORKS
-#
-# DESCRIPTION
-#
-# Internal use ONLY.
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission. The
-# general documentation, as well as the sample configure.in, is included
-# in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 6
-
-AU_ALIAS([AC_PROG_JAVAC_WORKS], [AX_PROG_JAVAC_WORKS])
-AC_DEFUN([AX_PROG_JAVAC_WORKS],[
-AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
-JAVA_TEST=Test.java
-CLASS_TEST=Test.class
-cat << \EOF > $JAVA_TEST
-/* [#]line __oline__ "configure" */
-public class Test {
-}
-EOF
-if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
- ac_cv_prog_javac_works=yes
-else
- AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
- echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
- cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
-fi
-rm -f $JAVA_TEST $CLASS_TEST
-])
-AC_PROVIDE([$0])dnl
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_javadoc.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVADOC
-#
-# DESCRIPTION
-#
-# AX_PROG_JAVADOC tests for an existing javadoc generator. It uses the
-# environment variable JAVADOC then tests in sequence various common
-# javadoc generator.
-#
-# If you want to force a specific compiler:
-#
-# - at the configure.in level, set JAVADOC=yourgenerator before calling
-# AX_PROG_JAVADOC
-#
-# - at the configure level, setenv JAVADOC
-#
-# You can use the JAVADOC variable in your Makefile.in, with @JAVADOC@.
-#
-# Note: This macro depends on the autoconf M4 macros for Java programs. It
-# is VERY IMPORTANT that you download that whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission.
-#
-# The general documentation of those macros, as well as the sample
-# configure.in, is included in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Egon Willighagen <e.willighagen@science.ru.nl>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 8
-
-AU_ALIAS([AC_PROG_JAVADOC], [AX_PROG_JAVADOC])
-AC_DEFUN([AX_PROG_JAVADOC],[
-AS_IF([test "x$JAVAPREFIX" = x],
- [test "x$JAVADOC" = x && AC_CHECK_PROGS([JAVADOC], [javadoc])],
- [test "x$JAVADOC" = x && AC_CHECK_PROGS([JAVADOC], [javadoc], [], [$JAVAPREFIX/bin])])
-test "x$JAVADOC" = x && AC_MSG_ERROR([no acceptable javadoc generator found in \$PATH])
-AC_PROVIDE([$0])dnl
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_javah.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_JAVAH
-#
-# DESCRIPTION
-#
-# AX_PROG_JAVAH tests the availability of the javah header generator and
-# looks for the jni.h header file. If available, JAVAH is set to the full
-# path of javah and CPPFLAGS is updated accordingly.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 8
-
-AU_ALIAS([AC_PROG_JAVAH], [AX_PROG_JAVAH])
-AC_DEFUN([AX_PROG_JAVAH],[
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CPP])dnl
-AC_PATH_PROG(JAVAH,javah)
-AS_IF([test -n "$ac_cv_path_JAVAH"],
- [
- AC_TRY_CPP([#include <jni.h>],,[
- ac_save_CPPFLAGS="$CPPFLAGS"
- _ACJAVAH_FOLLOW_SYMLINKS("$ac_cv_path_JAVAH")
- ax_prog_javah_bin_dir=`AS_DIRNAME([$_ACJAVAH_FOLLOWED])`
- ac_dir="`AS_DIRNAME([$ax_prog_javah_bin_dir])`/include"
- AS_CASE([$build_os],
- [cygwin*],
- [ac_machdep=win32],
- [ac_machdep=`AS_ECHO($build_os) | sed 's,[[-0-9]].*,,'`])
- CPPFLAGS="$ac_save_CPPFLAGS -I$ac_dir -I$ac_dir/$ac_machdep"
- AC_TRY_CPP([#include <jni.h>],
- ac_save_CPPFLAGS="$CPPFLAGS",
- AC_MSG_WARN([unable to include <jni.h>]))
- CPPFLAGS="$ac_save_CPPFLAGS"])
- ])
-])
-
-AC_DEFUN([_ACJAVAH_FOLLOW_SYMLINKS],[
-# find the include directory relative to the javac executable
-_cur="$1"
-while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
- AC_MSG_CHECKING([symlink for $_cur])
- _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
- case "$_slink" in
- /*) _cur="$_slink";;
- # 'X' avoids triggering unwanted echo options.
- *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
- esac
- AC_MSG_RESULT([$_cur])
-done
-_ACJAVAH_FOLLOWED="$_cur"
-])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_try_compile_java.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_TRY_COMPILE_JAVA
-#
-# DESCRIPTION
-#
-# AX_TRY_COMPILE_JAVA attempt to compile user given source.
-#
-# *Warning*: its success or failure can depend on a proper setting of the
-# CLASSPATH env. variable.
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission. The
-# general documentation, as well as the sample configure.in, is included
-# in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Devin Weaver <ktohg@tritarget.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 8
-
-AU_ALIAS([AC_TRY_COMPILE_JAVA], [AX_TRY_COMPILE_JAVA])
-AC_DEFUN([AX_TRY_COMPILE_JAVA],[
-AC_REQUIRE([AX_PROG_JAVAC])dnl
-cat << \EOF > Test.java
-/* [#]line __oline__ "configure" */
-ifelse([$1], , , [import $1;])
-public class Test {
-[$2]
-}
-EOF
-if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class
-then
-dnl Don't remove the temporary files here, so they can be examined.
- ifelse([$3], , :, [$3])
-else
- echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
- cat Test.java >&AS_MESSAGE_LOG_FD
-ifelse([$4], , , [ rm -fr Test.java Test.class
- $4
-])dnl
-fi
-rm -fr Test.java Test.class])
+++ /dev/null
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_try_run_java.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_TRY_RUN_JAVA
-#
-# DESCRIPTION
-#
-# AX_TRY_RUN_JAVA attempt to compile and run user given source.
-#
-# *Warning*: its success or failure can depend on a proper setting of the
-# CLASSPATH env. variable.
-#
-# Note: This is part of the set of autoconf M4 macros for Java programs.
-# It is VERY IMPORTANT that you download the whole set, some macros depend
-# on other. Unfortunately, the autoconf archive does not support the
-# concept of set of macros, so I had to break it for submission. The
-# general documentation, as well as the sample configure.in, is included
-# in the AX_PROG_JAVA macro.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Devin Weaver <ktohg@tritarget.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 2
-
-AU_ALIAS([AC_TRY_RUN_JAVA], [AX_TRY_RUN_JAVA])
-AC_DEFUN([AX_TRY_RUN_JAVA],[
-AC_REQUIRE([AX_PROG_JAVAC])dnl
-AC_REQUIRE([AX_PROG_JAVA])dnl
-cat << \EOF > Test.java
-/* [#]line __oline__ "configure" */
-ifelse([$1], , , [include $1;])
-public class Test {
-[$2]
-}
-EOF
-if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class && ($JAVA $JAVAFLAGS Test; exit) 2>/dev/null
-then
-dnl Don't remove the temporary files here, so they can be examined.
- ifelse([$3], , :, [$3])
-else
- echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
- cat Test.java >&AS_MESSAGE_LOG_FD
-ifelse([$4], , , [ rm -fr Test.java Test.class
- $4
-])dnl
-fi
-rm -fr Test.java Test.class])