diff --git a/platform.in b/platform.in index 39b1f42..99bb683 100644 --- a/platform.in +++ b/platform.in @@ -47,6 +47,14 @@ %_configure_target --build=%{_configure_platform} --host=%{_configure_platform} %_configure_gettext --without-included-gettext %_configure_update_config readlink -e -- '%{_configure_script}' |xargs -ri dirname -- '{}' |xargs -ri find '{}' -type f '(' -name config.sub -or -name config.guess ')' -printf '%%h/\\n' |sort -u |xargs -rn1 install -pm755 -- /usr/share/gnu-config/config.{sub,guess} +%_configure_use_runstatedir 1 +%_configure_detect_runstatedir \ + if grep -qF 'runstatedir=DIR' '%{_configure_script}'; then \ + configure_runstatedir_flags='--runstatedir=%{_runstatedir}' \ + else \ + echo >&2 'rpm-build: warning: %{_configure_script} script does not support --runstatedir' \ + fi + %configure \ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS; \ CXXFLAGS="${CXXFLAGS:-%optflags}"; export CXXFLAGS; \ @@ -57,6 +65,8 @@ %{?_enable_static:export lt_cv_prog_cc_static_works=yes ;} \ export lt_cv_deplibs_check_method=pass_all ; \ %{_configure_update_config}; \ + configure_runstatedir_flags= ; \ + %{?_configure_use_runstatedir:%{_configure_detect_runstatedir}} \ %{_configure_script} %{?_configure_target:%{_configure_target}} \\\ --prefix=%{_prefix} \\\ --exec-prefix=%{_exec_prefix} \\\ @@ -73,6 +83,7 @@ --infodir=%{_infodir} \\\ --disable-dependency-tracking \\\ --disable-silent-rules \\\ + $configure_runstatedir_flags \\\ %{?_configure_gettext:%{_configure_gettext}} %_makeinstall_target install @@ -88,6 +99,7 @@ libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\ libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\ + runstatedir=%{?buildroot:%{buildroot}}%{_runstatedir} \\\ sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\ mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\ infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\