qd-2.3.17-fix-build-system.patch 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. Fix build system
  2. * --enable options were misspecified
  3. * Targets were missing dependencies
  4. * Disable setting CXXFLAGS
  5. --- a/configure.ac
  6. +++ b/configure.ac
  7. @@ -18,14 +18,14 @@
  8. AC_CONFIG_AUX_DIR(config)
  9. AM_INIT_AUTOMAKE([nostdinc])
  10. -AM_CONFIG_HEADER([config.h])
  11. -AM_CONFIG_HEADER([include/qd/qd_config.h])
  12. +AC_CONFIG_HEADERS([config.h])
  13. +AC_CONFIG_HEADERS([include/qd/qd_config.h])
  14. AC_CANONICAL_HOST
  15. # Checks for arguments
  16. # --enable-inline
  17. -AC_ARG_ENABLE(enable_inline, AC_HELP_STRING(--enable-inline, [inline commonly used functions. [[default=yes]]]))
  18. +AC_ARG_ENABLE([inline], AS_HELP_STRING(--enable-inline, [inline commonly used functions. [[default=yes]]]))
  19. AC_MSG_CHECKING([if commonly used function is to be inlined])
  20. if test "$enable_inline" != "no"; then
  21. enable_inline="yes"
  22. @@ -34,7 +34,7 @@
  23. AC_MSG_RESULT($enable_inline)
  24. # --enable-ieee-add
  25. -AC_ARG_ENABLE(enable_ieee_add, AC_HELP_STRING(--enable-ieee-add, [use addition that satisfies IEEE-style error bound instead of Cray-style error bound. [[default=no]]]))
  26. +AC_ARG_ENABLE([ieee-add], AS_HELP_STRING(--enable-ieee-add, [use addition that satisfies IEEE-style error bound instead of Cray-style error bound. [[default=no]]]))
  27. AC_MSG_CHECKING([if addition with IEEE-style error bound is to be used])
  28. if test "$enable_ieee_add" = "yes"; then
  29. AC_DEFINE([QD_IEEE_ADD], [1], [Define to 1 to use additions with IEEE-style error bounds.])
  30. @@ -44,7 +44,7 @@
  31. AC_MSG_RESULT($enable_ieee_add)
  32. # --enable-sloppy-mul
  33. -AC_ARG_ENABLE(enable_sloppy_mul, AC_HELP_STRING(--enable-sloppy-mul, [use fast but slightly inaccurate multiplication. [[default=yes]]]))
  34. +AC_ARG_ENABLE([sloppy-mul], AS_HELP_STRING(--enable-sloppy-mul, [use fast but slightly inaccurate multiplication. [[default=yes]]]))
  35. AC_MSG_CHECKING([if sloppy multiplication is to be used])
  36. if test "$enable_sloppy_mul" != "no"; then
  37. enable_sloppy_mul="yes"
  38. @@ -53,7 +53,7 @@
  39. AC_MSG_RESULT($enable_sloppy_mul)
  40. # --enable-sloppy-div
  41. -AC_ARG_ENABLE(enable_sloppy_div, AC_HELP_STRING(--enable-sloppy-div, [use fast but slightly inaccurate division. [[default=yes]]]))
  42. +AC_ARG_ENABLE([sloppy-div], AS_HELP_STRING(--enable-sloppy-div, [use fast but slightly inaccurate division. [[default=yes]]]))
  43. AC_MSG_CHECKING([if sloppy division is to be used])
  44. if test "$enable_sloppy_div" != "no"; then
  45. enable_sloppy_div="yes"
  46. @@ -63,7 +63,7 @@
  47. # --enable-debug
  48. -AC_ARG_ENABLE(enable_debug, AC_HELP_STRING(--enable-debug, [enable debugging code. [[default=no]]]))
  49. +AC_ARG_ENABLE([debug], AS_HELP_STRING(--enable-debug, [enable debugging code. [[default=no]]]))
  50. AC_MSG_CHECKING([if debugging code is to be enabled])
  51. if test "$enable_debug" = "yes"; then
  52. AC_DEFINE([QD_DEBUG], [1], [Define to 1 to enable debugging code.])
  53. @@ -73,7 +73,7 @@
  54. AC_MSG_RESULT($enable_debug)
  55. # --enable-warnings
  56. -AC_ARG_ENABLE(enable_warnings, AC_HELP_STRING(--enable-warnings, [enable compiler warnings. [[default=no]]]))
  57. +AC_ARG_ENABLE([warnings], AS_HELP_STRING(--enable-warnings, [enable compiler warnings. [[default=no]]]))
  58. AC_MSG_CHECKING([if compiler warnings is to be enabled])
  59. if test "$enable_warnings" != "yes"; then
  60. enable_warnings="no"
  61. @@ -83,13 +83,6 @@
  62. # Checks for programs.
  63. AC_LANG(C++)
  64. -if test "$CXXFLAGS" = ""; then
  65. - if test "$enable_debug" = "yes"; then
  66. - CXXFLAGS="-O"
  67. - else
  68. - CXXFLAGS="-O2"
  69. - fi
  70. -fi
  71. # Set up compiler search list. DUe to possible case insensitive filesystems,
  72. # Cygwin and Apple systems sometimes gets confused between cc and CC.
  73. @@ -106,50 +99,10 @@
  74. fi
  75. AC_PROG_CC
  76. -
  77. -CXX_PROG_NAME=`basename $CXX`
  78. -case $host in
  79. - powerpc*-*-*)
  80. - case "$CXX_PROG_NAME" in
  81. - xlC*)
  82. - REQ_CXXFLAGS="$REQ_CXXFLAGS -qstrict"
  83. - ;;
  84. - esac
  85. - ;;
  86. - i?86-*-* | k?*-*-* | athlon-*-* | ia64-*-* | x86_64-*-*)
  87. - case "$CXX_PROG_NAME" in
  88. - icc|icpc|ecc)
  89. - REQ_CXXFLAGS="$REQ_CXXFLAGS -mp"
  90. - if test "$enable_warnings" = "yes"; then
  91. - CXXFLAGS="$CXXFLAGS -wd1572 -wd981 -wd1418 -wd1419"
  92. - fi
  93. - ;;
  94. - esac
  95. - ;;
  96. - alpha*-*-*)
  97. - case "$CXX_PROG_NAME" in
  98. - cxx)
  99. - CXXFLAGS="$CXXFLAGS -std strict_ansi -tweak"
  100. - ;;
  101. - esac
  102. - ;;
  103. -esac
  104. -
  105. -AC_SUBST(REQ_CXXFLAGS)
  106. -CXXFLAGS="$CXXFLAGS $REQ_CXXFLAGS"
  107. -
  108. -if test "$enable_warnings" = "yes"; then
  109. - if test "$GCC" = "yes"; then
  110. - CXXFLAGS="$CXXFLAGS -Wall"
  111. - fi
  112. -fi
  113. -
  114. -if test "$enable_debug" = "yes"; then
  115. - CXXFLAGS="$CXXFLAGS -g"
  116. -fi
  117. +CXXFLAGS="${CXXFLAGS} -Wall"
  118. # --enable-fma
  119. -AC_ARG_ENABLE(enable_fma, AC_HELP_STRING(--enable-fma, [use fused multiply-add/subtract (auto,gnu,ia64,c99,ibm,compiler). Use this option with care. [[default=auto]]]))
  120. +AC_ARG_ENABLE([fma], AS_HELP_STRING(--enable-fma, [use fused multiply-add/subtract (auto,gnu,ia64,c99,ibm,compiler). Use this option with care. [[default=auto]]]))
  121. if test "x$enable_fma" = "x"; then
  122. enable_fma="auto"
  123. fi
  124. @@ -248,7 +201,7 @@
  125. FCFLAGS="-O2"
  126. fi
  127. fi
  128. -AC_ARG_ENABLE(enable_fortran, AC_HELP_STRING(--enable-fortran, [build Fortran 77/90 interfaces [[default=auto]]]))
  129. +AC_ARG_ENABLE([fortran], AS_HELP_STRING(--enable-fortran, [build Fortran 77/90 interfaces [[default=auto]]]))
  130. if test "$enable_fortran" != "no"; then
  131. AC_LANG_PUSH(Fortran)
  132. AC_PROG_FC([xlf95 ifort pathf95 f95 gfortran g95 pgf95 lf95 fort ifc efc pathf90 xlf90 pgf90 epcf90 xlf f90])
  133. @@ -312,8 +265,7 @@
  134. AC_CHECK_LIB(m,sqrt)
  135. # libtool stuff
  136. -AC_DISABLE_SHARED
  137. -AC_PROG_LIBTOOL
  138. +LT_INIT
  139. # Output
  140. AC_CONFIG_FILES([Makefile config/Makefile src/Makefile include/Makefile
  141. --- a/fortran/Makefile.am
  142. +++ b/fortran/Makefile.am
  143. @@ -16,7 +16,9 @@
  144. lib_LTLIBRARIES = libqdmod.la libqd_f_main.la
  145. libqdmod_la_SOURCES = ddext.f ddmod.f qdext.f qdmod.f f_dd.cpp f_qd.cpp
  146. +libqdmod_la_LIBADD = $(top_builddir)/src/libqd.la $(FCLIBS)
  147. libqd_f_main_la_SOURCES = main.cpp
  148. +libqd_f_main_la_LIBADD = $(top_builddir)/src/libqd.la libqdmod.la $(FCLIBS)
  149. ddmod.lo: $(DDEXT) ddext.lo
  150. qdmod.lo: ddmod.lo $(DDMOD) qdext.lo
  151. $(QDMOD): qdmod.lo $(DDMOD)
  152. --- a/qd-config.in
  153. +++ b/qd-config.in
  154. @@ -14,7 +14,7 @@
  155. build_CXXFLAGS="@CXXFLAGS@"
  156. build_LDFLAGS="@LDFLAGS@"
  157. CXX="@CXX@"
  158. -CXXFLAGS="-I$includedir @REQ_CXXFLAGS@"
  159. +CXXFLAGS="-I$includedir"
  160. FC="@FC@"
  161. LDFLAGS="-L$libdir -lqd @LIBS@"