Skip to content

Commit

Permalink
Fix dejagnu.h linkage
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rurban committed Aug 1, 2018
1 parent b320c61 commit 51e3b96
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ addons:
- python-libxml2
- swig
- help2man
- dejagnu
matrix:
fast_finish: true
include:
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/Makefile.am
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 51e3b96

Please # to comment.