comparison configure.ac @ 21398:7e8a410e6124

break generated file dependence on Makefile (bug #46063) * build-aux/mk-mxarray-h.in.sh, build-aux/mk-version-h.in.sh, build-aux/subst-config-vals.in.sh, build-aux/subst-cross-config-vals.in.sh, build-aux/subst-default-vals.in.sh, build-aux/subst-f77-isnan-macro.in.sh, build-aux/subst-script-vals.in.sh: New files with commands extracted from build-aux/common.mk. * build-aux/common.mk (ADDRESS_SANITIZER_OPTIONS, do_subst_config_vals, do_subst_cross_config_vals, do_subst_default_vals, do_subst_script_vals): Eliminate macros that are now in script files. (FONTCONFIG_CPPFLAGS, FT2_CPPFLAGS, LIBEXT): Move definition to configure.ac, use AC_SUBST to put values in subst-config-vals.sh and build-aux/subst-cross-config-vals.sh. (startupfiledir, localstartupfiledir): Move definition to configure.ac, use AC_SUBST to put values in subst-default-vals.sh. (ALL_FFLAGS): Delete unused macro. (simple-filter-rule): New macro. * build-aux/mk-default-qt-settings.in.sh: Rename and adapt from libgui/mk-default-qt-settings.in. * build-aux/mk-f77-def.in.sh: Rename and adapt from liboctave/cruft/mkf77def.in. * Makefile.am (EXTRA_DIST): Include new files in the list. * acinclude.m4 (OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES): Assume file names have the suffix .sh and are generated from .in.sh. * Makefile.am (run-octave): Depend on build-aux/subst-script-vals.sh instead of Makefile. (octave-config.h): Use move-if-change rule. * configure.ac: Use ${X} instead of $(X) for variables in OCTAVE_SET_DEFAULT args. (SHARED_LIBS, STATIC_LIBS): AC_SUBST them. Protect timestamp of oct-conf-post.h with a move-if-change rule. * etc/module.mk (etc/icons/octave.appdata.xml, etc/icons/octave.desktop): Don't depend on Makefile. * libgui/module.mk (libgui/default-qt-settings): Depend on build-aux/mk-default-qt-settings.sh instead of Makefile. * build-env.h, build-env.cc (ALL_CFLAGS, ALL_CXXFLAGS, ALL_FFLAGS, ALL_LDFLAGS, LIBFLAGS): Delete variables. * libinterp/corefcn/module.mk ($(OPT_HANDLERS), $(COREFCN_FT2_DF), libinterp/corefcn/defaults.h, libinterp/corefcn/graphics.h, libinterp/corefcn/graphics-props.cc, libinterp/corefcn/oct-errno.cc, libinterp/corefcn/mxarray.h, libinterp/corefcn/oct-tex-lexer.ll): Depend on timestamp file to ensure destination directory exists. (libinterp/corefcn/graphics.h, libinterp/corefcn/graphics-props.cc, libinterp/corefcn/oct-errno.cc, libinterp/corefcn/oct-tex-lexer.ll, libinterp/corefcn/oct-tex-symbols.cc): Use mv instead of move-if-change. (libinterp/corefcn/mxarray.h): Use script to substitute values. Depend on libinterp/corefcn/mxarray.in.h instead of Makefile * libinterp/corefcn/toplev.cc (octave_config_info): Don't include ALL_CFLAGS, ALL_CXXFLAGS, ALL_FFLAGS, ALL_LDFLAGS, of LIBFLAGS in the list. * libinterp/module.mk ($(SRC_DEF_FILES)): Don't depend on Makefile. (libinterp/build-env.cc, libinterp/build-env-features.cc, libinterp/builtins.cc, libinterp/builtin-defun-decls.h, libinterp/dldfcn/PKG_ADD, libinterp/.DOCSTRINGS): Depend on timestamp file to ensure destination directory exists. (libinterp/build-env.cc): Depend on build-aux/subst-config-vals.sh instead of Makefile. (libinterp/version.h): Use script to substitute values. Depend on build-aux/mk-version-h.sh instead of libinterp/version.in.h. * liboctave/cruft/module.mk (liboctave/cruft/cruft.def): Depend on timestamp file to ensure destination directory exists. (liboctave_DISTCLEANFILES): Remove liboctave/cruft/mkf77def from the list. (liboctave_EXTRA_DIST): Don't add liboctave/cruft/mkf77def.in to the list. * liboctave/cruft/ranlib/module.mk (liboctave/cruft/ranlib/ranlib.def): Depend on timestamp file to ensure destination directory exists. * liboctave/cruft/slatec-fn/module.mk (liboctave/cruft/slatec-fn/erfc.f, liboctave/cruft/slatec-fn/derfc.f): Depend on timestamp file to ensure destination directory exists. Use script to substitute values. Depend on build-aux/subst-f77-isnan-macro.sh instead of Makefile. (do-subst-isnan-macro): Delete macro. * scripts/module.mk (GEN_FCN_FILES_TEMPLATE): Use simple-filter-rule to execute build-aux/subst-config-vals.sh. Depend on build-aux/subst-config-vals.sh instead of Makefile. (scripts/.DOCSTRINGS): Don't depend on Makefile. Do depend on timestamp file to ensure destination directory exists. * src/module.mk (src/$(host_triplet)-mkoctfile.cc, src/$(host_triplet)-octave-config.cc): Depend on build-aux/subst-cross-config-vals.sh instead of Makefile. (src/octave-config.cc, src/mkoctfile.cc, src/main.cc): Depend on build-aux/subst-default-vals.sh instead of Makefile.
author John W. Eaton <jwe@octave.org>
date Fri, 04 Mar 2016 12:51:00 -0500
parents df859661e31e
children 1aa293d58df0
comparison
equal deleted inserted replaced
21397:df859661e31e 21398:7e8a410e6124
85 85
86 ### Set default file locations 86 ### Set default file locations
87 87
88 ## Where to install and expect libraries like liboctave.a, liboctinterp.a, 88 ## Where to install and expect libraries like liboctave.a, liboctinterp.a,
89 ## and other architecture-dependent data. 89 ## and other architecture-dependent data.
90 OCTAVE_SET_DEFAULT([octlibdir], '$(libdir)/octave/$(version)') 90 OCTAVE_SET_DEFAULT([octlibdir], '${libdir}/octave/${version}')
91 91
92 ## Where to put executables to be run by Octave rather than 92 ## Where to put executables to be run by Octave rather than
93 ## the user. This path usually includes the Octave version 93 ## the user. This path usually includes the Octave version
94 ## and configuration name, so that multiple configurations 94 ## and configuration name, so that multiple configurations
95 ## for multiple versions of Octave may be installed at once. 95 ## for multiple versions of Octave may be installed at once.
96 OCTAVE_SET_DEFAULT([archlibdir], 96 OCTAVE_SET_DEFAULT([archlibdir],
97 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') 97 '${libexecdir}/octave/${version}/exec/${canonical_host_type}')
98 98
99 ## Where to put executables to be run by Octave rather than by the 99 ## Where to put executables to be run by Octave rather than by the
100 ## user that are specific to this site. 100 ## user that are specific to this site.
101 OCTAVE_SET_DEFAULT([localarchlibdir], 101 OCTAVE_SET_DEFAULT([localarchlibdir],
102 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') 102 '${libexecdir}/octave/site/exec/${canonical_host_type}')
103 103
104 OCTAVE_SET_DEFAULT([localapiarchlibdir], 104 OCTAVE_SET_DEFAULT([localapiarchlibdir],
105 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') 105 '${libexecdir}/octave/${api_version}/site/exec/${canonical_host_type}')
106 106
107 OCTAVE_SET_DEFAULT([localverarchlibdir], 107 OCTAVE_SET_DEFAULT([localverarchlibdir],
108 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') 108 '${libexecdir}/octave/${version}/site/exec/${canonical_host_type}')
109 109
110 ## Where to put object files that will by dynamically loaded. 110 ## Where to put object files that will by dynamically loaded.
111 ## This path usually includes the Octave version and configuration 111 ## This path usually includes the Octave version and configuration
112 ## name, so that multiple configurations for multiple versions of 112 ## name, so that multiple configurations for multiple versions of
113 ## Octave may be installed at once. 113 ## Octave may be installed at once.
114 OCTAVE_SET_DEFAULT([octfiledir], 114 OCTAVE_SET_DEFAULT([octfiledir],
115 '$(libdir)/octave/$(version)/oct/$(canonical_host_type)') 115 '${libdir}/octave/${version}/oct/${canonical_host_type}')
116 116
117 ## Directories Octave should search for object files that will be 117 ## Directories Octave should search for object files that will be
118 ## dynamically loaded and that are specific to this site 118 ## dynamically loaded and that are specific to this site
119 ## (i.e. customizations), before consulting ${octfiledir}. This should 119 ## (i.e. customizations), before consulting ${octfiledir}. This should
120 ## be a colon-separated list of directories. 120 ## be a colon-separated list of directories.
121 OCTAVE_SET_DEFAULT([localoctfiledir], 121 OCTAVE_SET_DEFAULT([localoctfiledir],
122 '$(libdir)/octave/site/oct/$(canonical_host_type)') 122 '${libdir}/octave/site/oct/${canonical_host_type}')
123 123
124 OCTAVE_SET_DEFAULT([localapioctfiledir], 124 OCTAVE_SET_DEFAULT([localapioctfiledir],
125 '$(libdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') 125 '${libdir}/octave/site/oct/${api_version}/${canonical_host_type}')
126 126
127 OCTAVE_SET_DEFAULT([localveroctfiledir], 127 OCTAVE_SET_DEFAULT([localveroctfiledir],
128 '$(libdir)/octave/$(version)/site/oct/$(canonical_host_type)') 128 '${libdir}/octave/${version}/site/oct/${canonical_host_type}')
129 129
130 ## Where to install Octave's include files. 130 ## Where to install Octave's include files.
131 OCTAVE_SET_DEFAULT([octincludedir], '$(includedir)/octave-$(version)/octave') 131 OCTAVE_SET_DEFAULT([octincludedir], '${includedir}/octave-${version}/octave')
132 132
133 ## Where to install the function file distributed with 133 ## Where to install the function file distributed with
134 ## Octave. This includes the Octave version, so that the 134 ## Octave. This includes the Octave version, so that the
135 ## function files for different versions of Octave will install 135 ## function files for different versions of Octave will install
136 ## themselves in separate directories. 136 ## themselves in separate directories.
137 OCTAVE_SET_DEFAULT([fcnfiledir], '$(datadir)/octave/$(version)/m') 137 OCTAVE_SET_DEFAULT([fcnfiledir], '${datadir}/octave/${version}/m')
138 138
139 ## Directories Octave should search for function files specific 139 ## Directories Octave should search for function files specific
140 ## to this site (i.e. customizations), before consulting 140 ## to this site (i.e. customizations), before consulting
141 ## ${fcnfiledir}. This should be a colon-separated list of 141 ## ${fcnfiledir}. This should be a colon-separated list of
142 ## directories. 142 ## directories.
143 OCTAVE_SET_DEFAULT([localfcnfiledir], '$(datadir)/octave/site/m') 143 OCTAVE_SET_DEFAULT([localfcnfiledir], '${datadir}/octave/site/m')
144 144
145 OCTAVE_SET_DEFAULT([localapifcnfiledir], 145 OCTAVE_SET_DEFAULT([localapifcnfiledir],
146 '$(datadir)/octave/site/$(api_version)/m') 146 '${datadir}/octave/site/${api_version}/m')
147 147
148 OCTAVE_SET_DEFAULT([localverfcnfiledir], '$(datadir)/octave/$(version)/site/m') 148 OCTAVE_SET_DEFAULT([localverfcnfiledir], '${datadir}/octave/${version}/site/m')
149 149
150 ## Where to install and expect extra files like NEWS and doc-cache. 150 ## Where to install and expect extra files like NEWS and doc-cache.
151 OCTAVE_SET_DEFAULT([octetcdir], '$(datadir)/octave/$(version)/etc') 151 OCTAVE_SET_DEFAULT([octetcdir], '${datadir}/octave/${version}/etc')
152 152
153 ## Where to install and expect the language files for the gui. 153 ## Where to install and expect the language files for the gui.
154 OCTAVE_SET_DEFAULT([octlocaledir], '$(datadir)/octave/$(version)/locale') 154 OCTAVE_SET_DEFAULT([octlocaledir], '${datadir}/octave/${version}/locale')
155 155
156 ## The full path to the default doc cache file. 156 ## The full path to the default doc cache file.
157 OCTAVE_SET_DEFAULT([doc_cache_file], '$(octetcdir)/doc-cache') 157 OCTAVE_SET_DEFAULT([doc_cache_file], '${octetcdir}/doc-cache')
158 158
159 ## Where to install test files. 159 ## Where to install test files.
160 OCTAVE_SET_DEFAULT([octtestsdir], '$(octetcdir)/tests') 160 OCTAVE_SET_DEFAULT([octtestsdir], '${octetcdir}/tests')
161 161
162 ## The full path to the default texi macros file. 162 ## The full path to the default texi macros file.
163 OCTAVE_SET_DEFAULT([texi_macros_file], '$(octetcdir)/macros.texi') 163 OCTAVE_SET_DEFAULT([texi_macros_file], '${octetcdir}/macros.texi')
164 164
165 ## Where Octave will search to find image files. 165 ## Where Octave will search to find image files.
166 OCTAVE_SET_DEFAULT([imagedir], '$(datadir)/octave/$(version)/imagelib') 166 OCTAVE_SET_DEFAULT([imagedir], '${datadir}/octave/${version}/imagelib')
167 167
168 ## Where Octave will search for example data files shipped with distribution. 168 ## Where Octave will search for example data files shipped with distribution.
169 OCTAVE_SET_DEFAULT([octdatadir], '$(datadir)/octave/$(version)/data') 169 OCTAVE_SET_DEFAULT([octdatadir], '${datadir}/octave/${version}/data')
170 170
171 OCTAVE_SET_DEFAULT([man1dir], '$(mandir)/man1') 171 ## Where Octave will look for startup files
172 OCTAVE_SET_DEFAULT([startupfiledir], ['${fcnfiledir}/startup'])
173 OCTAVE_SET_DEFAULT([localstartupfiledir], ['${localfcnfiledir}/startup'])
174
175 OCTAVE_SET_DEFAULT([man1dir], '${mandir}/man1')
172 176
173 OCTAVE_SET_DEFAULT([man1ext], '.1') 177 OCTAVE_SET_DEFAULT([man1ext], '.1')
174 178
175 OCTAVE_SET_DEFAULT([infofile], '$(infodir)/octave.info') 179 OCTAVE_SET_DEFAULT([infofile], '${infodir}/octave.info')
176 180
177 ### Check for programs used in building, installing, and running Octave. 181 ### Check for programs used in building, installing, and running Octave.
178 182
179 ## Programs used in configuring Octave. 183 ## Programs used in configuring Octave.
180 ## Find pkg-config executable (sets $PKG_CONFIG) 184 ## Find pkg-config executable (sets $PKG_CONFIG)
611 BUILD_CXX="g++" 615 BUILD_CXX="g++"
612 BUILD_CXXFLAGS="-O2 -g" 616 BUILD_CXXFLAGS="-O2 -g"
613 BUILD_LDFLAGS="" 617 BUILD_LDFLAGS=""
614 BUILD_EXEEXT="" 618 BUILD_EXEEXT=""
615 else 619 else
616 BUILD_CC='$(CC)' 620 BUILD_CC='${CC}'
617 BUILD_CFLAGS='$(CFLAGS)' 621 BUILD_CFLAGS='${CFLAGS}'
618 BUILD_CXX='$(CXX)' 622 BUILD_CXX='${CXX}'
619 BUILD_CXXFLAGS='$(CXXFLAGS)' 623 BUILD_CXXFLAGS='${CXXFLAGS}'
620 BUILD_LDFLAGS='$(LDFLAGS)' 624 BUILD_LDFLAGS='${LDFLAGS}'
621 BUILD_EXEEXT='$(EXEEXT)' 625 BUILD_EXEEXT='${EXEEXT}'
622 fi 626 fi
623 627
624 AC_ARG_VAR([BUILD_CC], 628 AC_ARG_VAR([BUILD_CC],
625 [build system C compiler (used if cross compiling)]) 629 [build system C compiler (used if cross compiling)])
626 AC_ARG_VAR([BUILD_CFLAGS], 630 AC_ARG_VAR([BUILD_CFLAGS],
1288 1292
1289 if test -n "$warn_freetype"; then 1293 if test -n "$warn_freetype"; then
1290 OCTAVE_CONFIGURE_WARNING([warn_freetype]) 1294 OCTAVE_CONFIGURE_WARNING([warn_freetype])
1291 else 1295 else
1292 FT2_CPPFLAGS="$FT2_CFLAGS" 1296 FT2_CPPFLAGS="$FT2_CFLAGS"
1297 ## Alias CPPFLAGS to CFLAGS. This is closer to the true meaning
1298 ## of `pkg-config --cflags` output.
1299 FT2_CPPFLAGS="$FT2_CFLAGS"
1300 AC_SUBST(FT2_CPPFLAGS)
1293 fi 1301 fi
1294 1302
1295 ## Check for Xft library (when using X11) 1303 ## Check for Xft library (when using X11)
1296 1304
1297 warn_xft="" 1305 warn_xft=""
1314 1322
1315 if test -n "$warn_fontconfig"; then 1323 if test -n "$warn_fontconfig"; then
1316 OCTAVE_CONFIGURE_WARNING([warn_fontconfig]) 1324 OCTAVE_CONFIGURE_WARNING([warn_fontconfig])
1317 else 1325 else
1318 FONTCONFIG_CPPFLAGS="$FONTCONFIG_CFLAGS" 1326 FONTCONFIG_CPPFLAGS="$FONTCONFIG_CFLAGS"
1327 ## Alias CPPFLAGS to CFLAGS. This is closer to the true meaning
1328 ## of `pkg-config --cflags` output.
1329 FONTCONFIG_CPPFLAGS="$FONTCONFIG_CFLAGS"
1330 AC_SUBST(FONTCONFIG_CPPFLAGS)
1319 fi 1331 fi
1320 1332
1321 ## Check for OSMesa which is needed for offscreen rendering with OpenGL 1333 ## Check for OSMesa which is needed for offscreen rendering with OpenGL
1322 ## FIXME: Check for version >= 9.0.0 1334 ## FIXME: Check for version >= 9.0.0
1323 OCTAVE_CHECK_LIB(OSMesa, OSMesa, 1335 OCTAVE_CHECK_LIB(OSMesa, OSMesa,
1480 [warn_qt_opengl="Qt does not work with the OpenGL libs (GL and GLU); disabling OpenGL graphics with Qt GUI"]) 1492 [warn_qt_opengl="Qt does not work with the OpenGL libs (GL and GLU); disabling OpenGL graphics with Qt GUI"])
1481 1493
1482 if test -n "$warn_qt_opengl"; then 1494 if test -n "$warn_qt_opengl"; then
1483 OCTAVE_CONFIGURE_WARNING([warn_qt_opengl]) 1495 OCTAVE_CONFIGURE_WARNING([warn_qt_opengl])
1484 fi 1496 fi
1485 endif
1486 1497
1487 if test $build_qt_graphics = yes; then 1498 if test $build_qt_graphics = yes; then
1488 AC_DEFINE(HAVE_QT_GRAPHICS, 1, [Define to 1 if Qt works with OpenGL libs (GL and GLU)]) 1499 AC_DEFINE(HAVE_QT_GRAPHICS, 1, [Define to 1 if Qt works with OpenGL libs (GL and GLU)])
1489 fi 1500 fi
1490 fi 1501 fi
1668 if test $enable_shared = yes; then 1679 if test $enable_shared = yes; then
1669 SHARED_LIBS=yes 1680 SHARED_LIBS=yes
1670 else 1681 else
1671 SHARED_LIBS=no 1682 SHARED_LIBS=no
1672 fi 1683 fi
1684 AC_SUBST(SHARED_LIBS)
1673 1685
1674 if test $enable_static = yes; then 1686 if test $enable_static = yes; then
1675 STATIC_LIBS=yes 1687 STATIC_LIBS=yes
1676 else 1688 else
1677 STATIC_LIBS=no 1689 STATIC_LIBS=no
1678 fi 1690 fi
1691 AC_SUBST(STATIC_LIBS)
1679 1692
1680 XTRA_CRUFT_SH_LDFLAGS= 1693 XTRA_CRUFT_SH_LDFLAGS=
1681 if test $have_msvc = yes; then 1694 if test $have_msvc = yes; then
1682 FLIBS="$FLIBS -lkernel32" 1695 FLIBS="$FLIBS -lkernel32"
1683 XTRA_CRUFT_SH_LDFLAGS="-Wl,cruft/cruft.def" 1696 XTRA_CRUFT_SH_LDFLAGS="-Wl,cruft/cruft.def"
1984 1997
1985 CPICFLAG=-fPIC 1998 CPICFLAG=-fPIC
1986 CXXPICFLAG=-fPIC 1999 CXXPICFLAG=-fPIC
1987 FPICFLAG=-fPIC 2000 FPICFLAG=-fPIC
1988 SHLEXT=so 2001 SHLEXT=so
1989 SHLLIB='$(SHLEXT)' 2002 SHLLIB='${SHLEXT}'
1990 SHLBIN= 2003 SHLBIN=
1991 SHLEXT_VER='$(SHLEXT).$(version)' 2004 SHLEXT_VER='${SHLEXT}.${version}'
1992 SHLLIB_VER='$(SHLLIB).$(version)' 2005 SHLLIB_VER='${SHLLIB}.${version}'
1993 SHLBIN_VER='$(SHLBIN).$(version)' 2006 SHLBIN_VER='${SHLBIN}.${version}'
1994 SHLLINKEXT= 2007 SHLLINKEXT=
1995 LIBPRE=lib 2008 LIBPRE=lib
1996 SHLPRE=lib 2009 SHLPRE=lib
1997 SHLLIBPRE=lib 2010 SHLLIBPRE=lib
1998 SHLBINPRE=lib 2011 SHLBINPRE=lib
1999 SH_LD='$(CXX)' 2012 SH_LD='${CXX}'
2000 SH_LDFLAGS=-shared 2013 SH_LDFLAGS=-shared
2001 DL_LD='$(SH_LD)' 2014 DL_LD='${SH_LD}'
2002 DL_LDFLAGS='$(SH_LDFLAGS)' 2015 DL_LDFLAGS='${SH_LDFLAGS}'
2003 MKOCTFILE_DL_LDFLAGS='$(DL_LDFLAGS)' 2016 MKOCTFILE_DL_LDFLAGS='${DL_LDFLAGS}'
2004 SONAME_FLAGS= 2017 SONAME_FLAGS=
2005 NO_OCT_FILE_STRIP=false 2018 NO_OCT_FILE_STRIP=false
2006 TEMPLATE_AR='$(AR)' 2019 TEMPLATE_AR='${AR}'
2007 TEMPLATE_ARFLAGS="$ARFLAGS" 2020 TEMPLATE_ARFLAGS="$ARFLAGS"
2008 CRUFT_DLL_DEFS= 2021 CRUFT_DLL_DEFS=
2009 OCTAVE_DLL_DEFS= 2022 OCTAVE_DLL_DEFS=
2010 OCTINTERP_DLL_DEFS= 2023 OCTINTERP_DLL_DEFS=
2011 OCTGUI_DLL_DEFS= 2024 OCTGUI_DLL_DEFS=
2028 CXXPICFLAG= 2041 CXXPICFLAG=
2029 FPICFLAG= 2042 FPICFLAG=
2030 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'" 2043 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'"
2031 ;; 2044 ;;
2032 *-*-darwin*) 2045 *-*-darwin*)
2033 DL_LDFLAGS='-bundle -bundle_loader $(top_builddir)/libinterp/octave $(LDFLAGS)' 2046 DL_LDFLAGS='-bundle -bundle_loader ${top_builddir}/libinterp/octave ${LDFLAGS}'
2034 MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $(bindir)/octave-$(version)$(EXEEXT)' 2047 MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader ${bindir}/octave-${version}${EXEEXT}'
2035 SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)' 2048 SH_LDFLAGS='-dynamiclib -single_module ${LDFLAGS}'
2036 case $canonical_host_type in 2049 case $canonical_host_type in
2037 powerpc-*) 2050 powerpc-*)
2038 CXXPICFLAG= 2051 CXXPICFLAG=
2039 CPICFLAG= 2052 CPICFLAG=
2040 FPICFLAG= 2053 FPICFLAG=
2041 ;; 2054 ;;
2042 esac 2055 esac
2043 SHLEXT=dylib 2056 SHLEXT=dylib
2044 SHLLIB='$(SHLEXT)' 2057 SHLLIB='${SHLEXT}'
2045 SHLEXT_VER='$(version).$(SHLEXT)' 2058 SHLEXT_VER='${version}.${SHLEXT}'
2046 SHLLIB_VER='$(version).$(SHLLIB)' 2059 SHLLIB_VER='${version}.${SHLLIB}'
2047 NO_OCT_FILE_STRIP=true 2060 NO_OCT_FILE_STRIP=true
2048 SONAME_FLAGS='-install_name $(octlibdir)/$@' 2061 SONAME_FLAGS='-install_name ${octlibdir}/$@'
2049 library_path_var=DYLD_LIBRARY_PATH 2062 library_path_var=DYLD_LIBRARY_PATH
2050 ;; 2063 ;;
2051 *-*-cygwin*) 2064 *-*-cygwin*)
2052 CPICFLAG= 2065 CPICFLAG=
2053 CXXPICFLAG= 2066 CXXPICFLAG=
2058 SHLEXT=dll 2071 SHLEXT=dll
2059 SHLLIB=dll.a 2072 SHLLIB=dll.a
2060 SHLBIN=dll 2073 SHLBIN=dll
2061 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc" 2074 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
2062 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base" 2075 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base"
2063 SONAME_FLAGS='-Wl,--out-implib=$(patsubst $(SHLPRE)%,$(LIBPRE)%,$@).a' 2076 SONAME_FLAGS='-Wl,--out-implib=$(patsubst ${SHLPRE}%,${LIBPRE}%,$@).a'
2064 ldpreloadsep=":" 2077 ldpreloadsep=":"
2065 ;; 2078 ;;
2066 *-*-mingw*) 2079 *-*-mingw*)
2067 if test $have_msvc = yes; then 2080 if test $have_msvc = yes; then
2068 DL_LDFLAGS="-shared" 2081 DL_LDFLAGS="-shared"
2192 CXXPICFLAG=-KPIC 2205 CXXPICFLAG=-KPIC
2193 SH_LDFLAGS=-G 2206 SH_LDFLAGS=-G
2194 fi 2207 fi
2195 ## Template closures in archive libraries need a different mechanism. 2208 ## Template closures in archive libraries need a different mechanism.
2196 if test "$GXX" != yes; then 2209 if test "$GXX" != yes; then
2197 TEMPLATE_AR='$(CXX)' 2210 TEMPLATE_AR='${CXX}'
2198 TEMPLATE_ARFLAGS="-xar -o" 2211 TEMPLATE_ARFLAGS="-xar -o"
2199 fi 2212 fi
2200 ;; 2213 ;;
2201 esac 2214 esac
2202 2215
2284 ;; 2297 ;;
2285 esac], 2298 esac],
2286 [link_all_deps=no]) 2299 [link_all_deps=no])
2287 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes]) 2300 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes])
2288 2301
2302 LIBEXT = a
2303 AC_SUBST(LIBEXT)
2304
2289 ## Dynamic linking is now enabled only if we are building shared 2305 ## Dynamic linking is now enabled only if we are building shared
2290 ## libs and some API for dynamic linking has been detected. 2306 ## libs and some API for dynamic linking has been detected.
2291 2307
2292 ## FIXME: A lot of the following duplicates the functionality of 2308 ## FIXME: A lot of the following duplicates the functionality of
2293 ## code generated by the dlopen option for LT_INIT. 2309 ## code generated by the dlopen option for LT_INIT.
2294 2310
2295 LD_CXX='$(CXX)' 2311 LD_CXX='${CXX}'
2296 RDYNAMIC_FLAG= 2312 RDYNAMIC_FLAG=
2297 DL_API_MSG="" 2313 DL_API_MSG=""
2298 dlopen_api=no 2314 dlopen_api=no
2299 shl_load_api=no 2315 shl_load_api=no
2300 loadlibrary_api=no 2316 loadlibrary_api=no
2354 2370
2355 if test $SHARED_LIBS = yes; then 2371 if test $SHARED_LIBS = yes; then
2356 LIBOCTINTERP="-loctinterp$SHLLINKEXT" 2372 LIBOCTINTERP="-loctinterp$SHLLINKEXT"
2357 LIBOCTAVE="-loctave$SHLLINKEXT" 2373 LIBOCTAVE="-loctave$SHLLINKEXT"
2358 else 2374 else
2359 LIBOCTINTERP='$(top_builddir)/libinterp/liboctinterp.$(LIBEXT)' 2375 LIBOCTINTERP='${top_builddir}/libinterp/liboctinterp.${LIBEXT}'
2360 LIBOCTAVE='$(top_builddir)/liboctave/liboctave.$(LIBEXT)' 2376 LIBOCTAVE='${top_builddir}/liboctave/liboctave.${LIBEXT}'
2361 fi 2377 fi
2362 2378
2363 AC_SUBST(LD_CXX) 2379 AC_SUBST(LD_CXX)
2364 AC_SUBST(RDYNAMIC_FLAG) 2380 AC_SUBST(RDYNAMIC_FLAG)
2365 AC_SUBST(ENABLE_DYNAMIC_LINKING) 2381 AC_SUBST(ENABLE_DYNAMIC_LINKING)
2367 AC_SUBST(LIBOCTAVE) 2383 AC_SUBST(LIBOCTAVE)
2368 2384
2369 2385
2370 if test "$cross_compiling" = yes && test -n "$ac_tool_prefix"; then 2386 if test "$cross_compiling" = yes && test -n "$ac_tool_prefix"; then
2371 CROSS_TOOL_PREFIX="$ac_tool_prefix" 2387 CROSS_TOOL_PREFIX="$ac_tool_prefix"
2372 MKOCTFILE_AR='$(shell echo $(AR) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2388 MKOCTFILE_AR='$(shell echo ${AR} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2373 MKOCTFILE_CC='$(shell echo $(CC) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2389 MKOCTFILE_CC='$(shell echo ${CC} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2374 MKOCTFILE_CXX='$(shell echo $(CXX) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2390 MKOCTFILE_CXX='$(shell echo ${CXX} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2375 MKOCTFILE_DL_LD='$(shell echo $(DL_LD) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2391 MKOCTFILE_DL_LD='$(shell echo ${DL_LD} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2376 MKOCTFILE_F77='$(shell echo $(F77) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2392 MKOCTFILE_F77='$(shell echo ${F77} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2377 MKOCTFILE_LD_CXX='$(shell echo $(LD_CXX) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2393 MKOCTFILE_LD_CXX='$(shell echo ${LD_CXX} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2378 MKOCTFILE_RANLIB='$(shell echo $(RANLIB) | $(SED) "s,$(CROSS_TOOL_PREFIX),,")' 2394 MKOCTFILE_RANLIB='$(shell echo ${RANLIB} | ${SED} "s,${CROSS_TOOL_PREFIX},,")'
2379 else 2395 else
2380 MKOCTFILE_AR="$AR" 2396 MKOCTFILE_AR="$AR"
2381 MKOCTFILE_CC="$CC" 2397 MKOCTFILE_CC="$CC"
2382 MKOCTFILE_CXX="$CXX" 2398 MKOCTFILE_CXX="$CXX"
2383 MKOCTFILE_DL_LD="$DL_LD" 2399 MKOCTFILE_DL_LD="$DL_LD"
2832 [add extra -fsanitize=address and -fno-omit-frame-pointer options to CFLAGS, CXXFLAGS, and LDFLAGS])], 2848 [add extra -fsanitize=address and -fno-omit-frame-pointer options to CFLAGS, CXXFLAGS, and LDFLAGS])],
2833 [if test "$enableval" = yes; then 2849 [if test "$enableval" = yes; then
2834 try_address_sanitizer_flags=yes 2850 try_address_sanitizer_flags=yes
2835 fi], 2851 fi],
2836 []) 2852 [])
2853
2854 if test $try_address_sanitizer_flags = yes; then
2855 ADDRESS_SANITIZER_OPTIONS="symbolize=1"
2856 AC_SUBST(ADDRESS_SANITIZER_OPTIONS)
2857 fi
2837 2858
2838 AM_CONDITIONAL([AMCOND_ADDRESS_SANITIZER_ENABLED], 2859 AM_CONDITIONAL([AMCOND_ADDRESS_SANITIZER_ENABLED],
2839 [test $try_address_sanitizer_flags = yes]) 2860 [test $try_address_sanitizer_flags = yes])
2840 2861
2841 if test $try_address_sanitizer_flags = yes; then 2862 if test $try_address_sanitizer_flags = yes; then
3187 ### Do the substitutions in all the Makefiles. 3208 ### Do the substitutions in all the Makefiles.
3188 3209
3189 AC_SUBST(ac_config_files) 3210 AC_SUBST(ac_config_files)
3190 AC_SUBST(ac_config_headers) 3211 AC_SUBST(ac_config_headers)
3191 3212
3192 dnl We use a .in.h file for oct-conf-post.h simply to copy it to
3193 dnl the build tree and so that we don't have to add the -I$(top_srcdir)
3194 dnl to any CPPFLAGS variables.
3195 AC_CONFIG_FILES([ 3213 AC_CONFIG_FILES([
3196 oct-conf-post.h:oct-conf-post.in.h
3197 Makefile 3214 Makefile
3198 doc/doxyhtml/Doxyfile 3215 doc/doxyhtml/Doxyfile
3199 libgnu/Makefile]) 3216 libgnu/Makefile])
3200 3217
3218 dnl We use a .in.h file for oct-conf-post.h simply to copy it to
3219 dnl the build tree and so that we don't have to add the -I${top_srcdir}
3220 dnl to any CPPFLAGS variables.
3221
3222 AC_CONFIG_FILES([oct-conf-post.h-tmp:oct-conf-post.in.h])
3223 AC_CONFIG_COMMANDS([oct-conf-post.h],
3224 [$SHELL $srcdir/build-aux/move-if-change oct-conf-post.h-tmp oct-conf-post.h])
3225
3201 OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES([ 3226 OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES([
3202 libgui/mk-default-qt-settings 3227 build-aux/mk-mxarray-h.sh
3203 liboctave/cruft/mkf77def]) 3228 build-aux/mk-version-h.sh
3229 build-aux/subst-config-vals.sh
3230 build-aux/subst-cross-config-vals.sh
3231 build-aux/subst-default-vals.sh
3232 build-aux/subst-f77-isnan-macro.sh
3233 build-aux/subst-script-vals.sh
3234 build-aux/mk-default-qt-settings.sh
3235 build-aux/mk-f77-def.sh])
3204 3236
3205 AC_OUTPUT 3237 AC_OUTPUT
3206 3238
3207 ### Print a summary so that important information isn't missed. 3239 ### Print a summary so that important information isn't missed.
3208 3240