diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-05-11 19:09:13 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-05-11 19:09:13 +0200 |
commit | f9e7f4a1a398666143ef0c29da0ee406616e3807 (patch) | |
tree | 53c5d5b24f858ddaa6921ab96ae3ee4b0d211c7a /lib/gl | |
parent | e31ee323fe17e3478bc6c614af64eb73b35395d9 (diff) | |
download | gnutls-f9e7f4a1a398666143ef0c29da0ee406616e3807.tar.gz |
Move gnulib tests into proper directory.
Diffstat (limited to 'lib/gl')
-rw-r--r-- | lib/gl/Makefile.am | 2 | ||||
-rw-r--r-- | lib/gl/m4/gnulib-cache.m4 | 4 | ||||
-rw-r--r-- | lib/gl/m4/gnulib-comp.m4 | 4 | ||||
-rw-r--r-- | lib/gl/m4/ld-output-def.m4 | 29 | ||||
-rw-r--r-- | lib/gl/m4/ld-version-script.m4 | 44 |
5 files changed, 81 insertions, 2 deletions
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am index ba19b7c9bf..4913642cad 100644 --- a/lib/gl/Makefile.am +++ b/lib/gl/Makefile.am @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf AUTOMAKE_OPTIONS = 1.5 gnits diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4 index 92e965bca8..66d982a6dd 100644 --- a/lib/gl/m4/gnulib-cache.m4 +++ b/lib/gl/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf +# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) @@ -25,6 +25,8 @@ gl_MODULES([ fseeko func gettext + lib-msvc-compat + lib-symbol-versions memmem-simple memmove minmax diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4 index ebe8e4b5e0..9f3f51f6df 100644 --- a/lib/gl/m4/gnulib-comp.m4 +++ b/lib/gl/m4/gnulib-comp.m4 @@ -53,6 +53,8 @@ AC_DEFUN([lgl_INIT], AM_GNU_GETTEXT_VERSION([0.17]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) + gl_LD_OUTPUT_DEF + gl_LD_VERSION_SCRIPT gl_FUNC_LSEEK gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_MEMMEM_SIMPLE @@ -306,6 +308,8 @@ AC_DEFUN([lgl_FILE_LIST], [ m4/inttypes-pri.m4 m4/inttypes_h.m4 m4/lcmessage.m4 + m4/ld-output-def.m4 + m4/ld-version-script.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 diff --git a/lib/gl/m4/ld-output-def.m4 b/lib/gl/m4/ld-output-def.m4 new file mode 100644 index 0000000000..1aa6a6fbbf --- /dev/null +++ b/lib/gl/m4/ld-output-def.m4 @@ -0,0 +1,29 @@ +# ld-output-def.m4 serial 2 +dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_LD_OUTPUT_DEF() +# ------------- +# Check if linker supports -Wl,--output-def and define automake +# conditional HAVE_LD_OUTPUT_DEF if it is. +AC_DEFUN([gl_LD_OUTPUT_DEF], +[ + AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def], + [gl_cv_ld_output_def], + [if test "$enable_shared" = no; then + gl_cv_ld_output_def="not needed, shared libraries are disabled" + else + gl_ldflags_save=$LDFLAGS + LDFLAGS="-Wl,--output-def,conftest.def" + AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [gl_cv_ld_output_def=yes], + [gl_cv_ld_output_def=no]) + rm -f conftest.def + LDFLAGS="$gl_ldflags_save" + fi]) + AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes") +]) diff --git a/lib/gl/m4/ld-version-script.m4 b/lib/gl/m4/ld-version-script.m4 new file mode 100644 index 0000000000..a97888f249 --- /dev/null +++ b/lib/gl/m4/ld-version-script.m4 @@ -0,0 +1,44 @@ +# ld-version-script.m4 serial 1 +dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# FIXME: The test below returns a false positive for mingw +# cross-compiles, 'local:' statements does not reduce number of +# exported symbols in a DLL. Use --disable-ld-version-script to work +# around the problem. + +# gl_LD_VERSION_SCRIPT +# -------------------- +# Check if LD supports linker scripts, and define automake conditional +# HAVE_LD_VERSION_SCRIPT if so. +AC_DEFUN([gl_LD_VERSION_SCRIPT], +[ + AC_ARG_ENABLE([ld-version-script], + AS_HELP_STRING([--enable-ld-version-script], + [enable linker version script (default is enabled when possible)]), + [have_ld_version_script=$enableval], []) + if test -z "$have_ld_version_script"; then + AC_MSG_CHECKING([if LD -Wl,--version-script works]) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + cat > conftest.map <<EOF +VERS_1 { + global: sym; +}; + +VERS_2 { + global: sym; +} VERS_1; +EOF + AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), + [have_ld_version_script=yes], [have_ld_version_script=no]) + rm -f conftest.map + LDFLAGS="$save_LDFLAGS" + AC_MSG_RESULT($have_ld_version_script) + fi + AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") +]) |