diff options
author | shrinivasan ganapathy <shrinivasanganapathy@gmail.com> | 2017-08-11 12:14:05 -0700 |
---|---|---|
committer | shrinivasan ganapathy <shrinivasanganapathy@gmail.com> | 2017-08-17 10:36:00 -0700 |
commit | e1b749ab40f057bc5098a882b60e3a20da1cf1f9 (patch) | |
tree | b8a9b4d7b435da05f28fb0f5198ad03403c49292 /vcl-ldpreload/src/configure.ac | |
parent | e6f61ec6c384d68cc3623f6a1070d9234eeed610 (diff) |
VCL-LDPRELOAD LIBRARY
A LD_PRELOAD library built on top of VCL library
- initial creation.
- User can LD_PRELOAD any application that uses POSIX socket
API and yet reap the benifits of VPP transport.
- addressed review comments
- fix bug in vcom_select
rv was always zero.
- updated README.md with instructions to use socket_test.sh script
Signed-off-by: shrinivasan ganapathy <shrinivasanganapathy@gmail.com>
new file: vcl-ldpreload/LICENSE
new file: vcl-ldpreload/MAINTAINERS
new file: vcl-ldpreload/src/Makefile.am
new file: vcl-ldpreload/src/configure.ac
new file: vcl-ldpreload/src/libvcl-ldpreload.am
new file: vcl-ldpreload/src/libvcl-ldpreload/TODO
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom.c
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom.h
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom_glibc_socket.h
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom_socket.c
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom_socket.h
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom_socket_wrapper.c
new file: vcl-ldpreload/src/libvcl-ldpreload/vcom_socket_wrapper.h
new file: vcl-ldpreload/src/vcl-ldpreload.mk
new file: vcl-ldpreload/test/README.md
Change-Id: I0db70bc4c3b3bac35451afa432c20dc04cb9699c
Signed-off-by: shrinivasan ganapathy <shrinivasanganapathy@gmail.com>
Diffstat (limited to 'vcl-ldpreload/src/configure.ac')
-rw-r--r-- | vcl-ldpreload/src/configure.ac | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/vcl-ldpreload/src/configure.ac b/vcl-ldpreload/src/configure.ac new file mode 100644 index 0000000..cee7c95 --- /dev/null +++ b/vcl-ldpreload/src/configure.ac @@ -0,0 +1,151 @@ +AC_INIT([vcl-ldpreload], [1.0], [vpp-dev@fd.io]) +LT_INIT +AC_CONFIG_AUX_DIR([.]) +AM_INIT_AUTOMAKE([subdir-objects]) +AM_SILENT_RULES([yes]) +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_PROG_CC +AM_PROG_AS +AM_PROG_LIBTOOL +AC_PROG_YACC +AM_PATH_PYTHON + +AC_ARG_VAR(VPP_DIR,[ vpp build directory ]) +AM_CONDITIONAL([VPP_DIR_SET], [test ! -z "$VPP_DIR"]) + +############################################################################### +# Macros +############################################################################### + +AC_DEFUN([ENABLE_ARG], +[ + AC_ARG_ENABLE($1, + AC_HELP_STRING(patsubst([--enable-$1],[_],[-]), $2), + [enable_$1=yes n_enable_$1=1], + [enable_$1=no n_enable_$1=0]) + AM_CONDITIONAL(m4_toupper(ENABLE_$1), test "$enable_$1" = "yes") + m4_append([list_of_enabled], [$1], [, ]) +]) + +AC_DEFUN([DISABLE_ARG], +[ + AC_ARG_ENABLE($1, + AC_HELP_STRING(patsubst([--disable-$1],[_],[-]), $2), + [enable_$1=no n_enable_$1=0], + [enable_$1=yes n_enable_$1=1]) + AM_CONDITIONAL(m4_toupper(ENABLE_$1), test "$enable_$1" = "yes") + m4_append([list_of_enabled], [$1], [, ]) +]) + +AC_DEFUN([WITH_ARG], +[ + AC_ARG_WITH($1, + AC_HELP_STRING(patsubst([--with-$1],[_],[-]), $2), + [with_$1=yes n_with_$1=1], + [with_$1=no n_with_$1=0]) + AM_CONDITIONAL(m4_toupper(WITH_$1), test "$with_$1" = "yes") + m4_append([list_of_with], [$1], [, ]) +]) + +AC_DEFUN([WITHOUT_ARG], +[ + AC_ARG_WITH($1, + AC_HELP_STRING(patsubst([--without-$1],[_],[-]), $2), + [with_$1=no n_with_$1=0], + [with_$1=yes n_with_$1=1]) + AM_CONDITIONAL(m4_toupper(WITH_$1), test "$with_$1" = "yes") + m4_append([list_of_with], [$1], [, ]) +]) + + +AC_DEFUN([PRINT_VAL], [ AC_MSG_RESULT(AC_HELP_STRING($1,$2)) ]) + + +############################################################################### +# configure arguments +############################################################################### + +# --enable-X + +AC_ARG_ENABLE([vpp-debug], +[ --enable-vpp-debug Use vpp debug native build libraries], + [if test x$enableval = xyes; then + AC_DEFINE(VPP_DEBUG, 1, [Define this to use vpp debug native build libraries.]) + vpp_debug=true + fi], [vpp_debug=false]) +AM_CONDITIONAL([VPP_DEBUG], [test x$vpp_debug = xtrue]) + +AC_ARG_ENABLE([vcl-ldpreload-debug], +[ --enable-vcl-ldpreload-debug Turn on vcl-ldpreload debugging], + [if test x$enableval = xyes; then + AC_DEFINE(VCL_LDPRELOAD_DEBUG, 1, [Define this to enable vcl-ldpreload debug.]) + vcl_ldpreload_debug=true + fi], [vcl_ldpreload_debug=false]) +AM_CONDITIONAL([VCL_LDPRELOAD_DEBUG], [test x$vcl_ldpreload_debug = xtrue]) + +# --disable-X + +# --with-X + +# --without-X + +AC_ARG_WITH(unix, + AC_HELP_STRING([--with-unix],[Compile unix version of clib]), + [], + [case $host_os in + darwin* | linux*) with_unix=yes;; + *) with_unix=no;; + esac]) + +AM_CONDITIONAL(WITH_UNIX, test "$with_unix" = "yes") + + +############################################################################### +# Substitutions and defines +############################################################################### + + +# Silence following noise: +# ar: `u' modifier ignored since `D' is the default (see `U') +AR_FLAGS=cr +AC_SUBST(AR_FLAGS) + + +############################################################################### +# Dependency checks +############################################################################### + +############################################################################### +# Output +############################################################################### + +AC_OUTPUT + +AC_MSG_RESULT([==============================================================================]) +PRINT_VAL([version], $PACKAGE $VERSION) +PRINT_VAL([prefix], ${prefix}) +PRINT_VAL([exec_prefix], ${exec_prefix}) +PRINT_VAL([libdir], ${libdir}) +PRINT_VAL([includedir], ${includedir}) +PRINT_VAL([CFLAGS], ${CFLAGS}) +PRINT_VAL([CPPFLAGS], ${CPPFLAGS}) +PRINT_VAL([LDFLAGS], ${LDFLAGS}) + +AC_MSG_RESULT([]) +AC_MSG_RESULT([with:]) +m4_foreach([x], m4_dquote(list_of_with), [ + AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${with_], x, [}]))) +]) + +AC_MSG_RESULT([]) +AC_MSG_RESULT([enabled:]) +m4_foreach([x], m4_dquote(list_of_enabled), [ + AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${enable_], x, [}]))) +]) + +AC_MSG_RESULT([]) +AC_MSG_RESULT([==============================================================================]) + + |