From 51e3b96fa31e245901dfb731b11cde8a4a15dd97 Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Wed, 1 Aug 2018 18:48:51 +0200 Subject: [PATCH] Fix dejagnu.h linkage probe for -fgnu89-inline and use it. See https://gcc.gnu.org/bugzilla//show_bug.cgi?id=63613 Fixes [GH #2] Add dejagnu to cygwin and ubuntu/travis. msys2 dejagnu is not picked up, macos not tested on travis. --- .appveyor.yml | 3 +-- .travis.yml | 1 + configure.ac | 7 +++++++ test/testcases/Makefile.am | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 27bfd89d25..f5d6096eac 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -58,8 +58,7 @@ init: - if "%PLATFORM%"=="x64" set P=64 - if "%CYGWIN%"=="1" set CYG_ROOT=c:\cygwin%P% - if "%CYGWIN%"=="1" appveyor DownloadFile http://cygwin.com/%ISETUP%.exe -FileName %CYG_ROOT%\setup.exe - - if "%CYGWIN%"=="1" %CYG_ROOT%\setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P libxml2,libxml2-devel,libiconv-devel,python2-devel,python2-libxml2,swig,help2man,libcrypt-devel - # skip dejagnu. fails to link + - if "%CYGWIN%"=="1" %CYG_ROOT%\setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P libxml2,libxml2-devel,libiconv-devel,python2-devel,python2-libxml2,swig,help2man,libcrypt-devel,dejagnu build_script: - if "%CYGWIN%"=="1" set PATH=%CYG_ROOT%\bin;c:\Windows\system32;c:\Windows;c:\Windows\system32\Wbem diff --git a/.travis.yml b/.travis.yml index 93bda8ddf9..ed64bffd06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ addons: - python-libxml2 - swig - help2man + - dejagnu matrix: fast_finish: true include: diff --git a/configure.ac b/configure.ac index 672384af73..7caedaf06c 100644 --- a/configure.ac +++ b/configure.ac @@ -154,6 +154,13 @@ then [Define if __attribute__((visibility("default"))) is supported.]) fi +if test x$ac_cv_header_dejagnu_h = xyes; then + dnl check if dejagnu needs -fgnu89-inline + dnl https://gcc.gnu.org/bugzilla//show_bug.cgi?id=63613 + AX_CHECK_COMPILE_FLAG([-fgnu89-inline],[DEJAGNU_CFLAGS=-fgnu89-inline],[DEJAGNU_CFLAGS=]) + AC_SUBST([DEJAGNU_CFLAGS]) +fi + dnl until we can make a release, favor no -O2 optims. dnl it's fast enough and better for debugging. dnl if test x$ac_compiler_gnu = xyes; then diff --git a/test/testcases/Makefile.am b/test/testcases/Makefile.am index c1771604bb..3cf2de7dd0 100644 --- a/test/testcases/Makefile.am +++ b/test/testcases/Makefile.am @@ -1,7 +1,7 @@ AUTOMAKE_OPTIONS = dejagnu WARN_CFLAGS = @WARN_CFLAGS@ -AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(WARN_CFLAGS) +AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(WARN_CFLAGS) @DEJAGNU_CFLAGS@ LDADD = $(top_builddir)/src/libredwg.la -lm bits_test_LDADD = $(LDADD) $(top_builddir)/src/bits.lo