Fix include dirs for windres, enable emxbind to actually produce output,
restore RESCOMP for backward compatibility and forward availability. Check for windres again. Whatever bakefiles do with it, they do not make it available to configure. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dbcca2fa1f
commit
004ee6daa7
40
configure.in
40
configure.in
@ -1448,10 +1448,15 @@ AC_CHECK_TOOL(STRIP, strip, true)
|
||||
dnl Win32 tools
|
||||
if test "$wxUSE_WINE" = "yes"; then
|
||||
AC_CHECK_TOOL(WINDRES, wrc)
|
||||
RESCOMP="$WINDRES"
|
||||
else
|
||||
case "${host}" in
|
||||
*-*-cygwin* | *-*-mingw32* )
|
||||
dnl Bakefile CVS (as of 2005-11-24) now detects windres properly
|
||||
dnl ... maybe it does, but it does not make it available here
|
||||
dnl anymore, so do it ourselves still.
|
||||
AC_CHECK_TOOL(WINDRES, windres)
|
||||
RESCOMP="$WINDRES"
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool)
|
||||
;;
|
||||
esac
|
||||
@ -2725,8 +2730,10 @@ if test "$USE_WIN32" = 1 ; then
|
||||
RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
|
||||
RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
|
||||
|
||||
dnl This one we export to wx-config.
|
||||
WXCONFIG_RESFLAGS="--include-dir \$includedir --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
|
||||
dnl This lot we export to wx-config. It must add the relevant
|
||||
dnl include directories at the point when they can be known.
|
||||
dnl (but are these (still) required anyway?)
|
||||
WXCONFIG_RESFLAGS="--define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
|
||||
|
||||
dnl install Win32-specific files in "make install"
|
||||
WIN32INSTALL=win32install
|
||||
@ -3906,24 +3913,33 @@ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
|
||||
dnl since the carb resource *must* be included in the application
|
||||
if test "$wxUSE_MAC" = 1; then
|
||||
POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o"
|
||||
|
||||
dnl this command is used to implement `wx-config --rezflags` and it is
|
||||
dnl eval'd there so escape any metacharacters inside
|
||||
WXCONFIG_POSTLINK_COMMAND="${REZ} -d __DARWIN__ -t APPL Carbon.r -o"
|
||||
RESCOMP="$REZ"
|
||||
WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o"
|
||||
else
|
||||
POSTLINK_COMMAND="echo -n | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES} -o"
|
||||
WXCONFIG_POSTLINK_COMMAND="echo -n \\\| ${REZ} -d __DARWIN__ -t APPL \\\${exec_prefix}/lib/${WX_RESOURCES_MACOSX_ASCII} -o"
|
||||
POSTLINK_COMMAND="echo -n | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES}"
|
||||
RESCOMP="echo -n \| $REZ"
|
||||
WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL \$libdir/$WX_RESOURCES_MACOSX_ASCII"
|
||||
fi
|
||||
|
||||
dnl this one for deprecated --rezflags.
|
||||
WXCONFIG_POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS -o"
|
||||
|
||||
else
|
||||
dnl default value is to (silently) do nothing in the makefile
|
||||
MACSETFILE="@true"
|
||||
WXCONFIG_POSTLINK_COMMAND="@true"
|
||||
|
||||
if test "$wxUSE_PM" = 1; then
|
||||
POSTLINK_COMMAND="emxbind -ep"
|
||||
RESCOMP="emxbind"
|
||||
WXCONFIG_RESFLAGS="-ep"
|
||||
|
||||
dnl Is this one really used anywhere for pm?
|
||||
POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS"
|
||||
else
|
||||
POSTLINK_COMMAND="@true"
|
||||
fi
|
||||
|
||||
dnl this one for deprecated --rezflags.
|
||||
WXCONFIG_POSTLINK_COMMAND="$POSTLINK_COMMAND"
|
||||
fi
|
||||
|
||||
|
||||
@ -7223,7 +7239,6 @@ fi
|
||||
|
||||
dnl TOOLCHAIN_DEFS should be used for both wx and client code
|
||||
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $TOOLCHAIN_DEFS"
|
||||
WXCONFIG_RESCOMP="$WINDRES $WXCONFIG_RESFLAGS"
|
||||
|
||||
dnl for convenience, sort the samples in alphabetical order
|
||||
dnl
|
||||
@ -7281,7 +7296,7 @@ AC_SUBST(WXCONFIG_CXXFLAGS)
|
||||
AC_SUBST(WXCONFIG_LIBS)
|
||||
AC_SUBST(WXCONFIG_RPATH)
|
||||
AC_SUBST(WXCONFIG_LDFLAGS_GUI)
|
||||
AC_SUBST(WXCONFIG_RESCOMP)
|
||||
AC_SUBST(WXCONFIG_RESFLAGS)
|
||||
AC_SUBST(EXE_LINKER)
|
||||
|
||||
dnl distribution vars
|
||||
@ -7299,6 +7314,7 @@ AC_SUBST(DMALLOC_LIBS)
|
||||
AC_SUBST(WX_VERSION_TAG)
|
||||
|
||||
dnl additional resurces settings
|
||||
AC_SUBST(RESCOMP)
|
||||
AC_SUBST(WINDRES)
|
||||
AC_SUBST(REZ)
|
||||
AC_SUBST(RESFLAGS)
|
||||
|
61
wx-config.in
61
wx-config.in
@ -881,14 +881,14 @@ bindir="@bindir@"
|
||||
[ -z "$output_option_version" ] || echo "@WX_VERSION@"
|
||||
[ -z "$output_option_version_full" ] || echo "@WX_SUBVERSION@"
|
||||
[ -z "$output_option_basename" ] || echo "@WX_LIBRARY_BASENAME_GUI@"
|
||||
# --rezflags is deprecated
|
||||
[ -z "$output_option_rezflags" ] || echo "@WXCONFIG_POSTLINK_COMMAND@"
|
||||
[ -z "$output_option_rescomp" ] || echo "@WXCONFIG_RESCOMP@"
|
||||
[ -z "$output_option_cc" ] || echo "@CC@"
|
||||
[ -z "$output_option_cxx" ] || echo "@CXX@"
|
||||
[ -z "$output_option_ld" ] || echo "@EXE_LINKER@"
|
||||
[ -z "$flag_option_selected_config" ] || echo "$this_config"
|
||||
|
||||
# --rezflags is deprecated (2005/11/29)
|
||||
[ -z "$output_option_rezflags" ] || echo "@WXCONFIG_POSTLINK_COMMAND@"
|
||||
|
||||
|
||||
# The rest are going to need a little more work.
|
||||
# --------------------------------------------------------------
|
||||
@ -1167,6 +1167,61 @@ if [ -n "$output_option_libs" ]; then
|
||||
echo $_ldflags "@LDFLAGS@" $_rpath $wx_libs "@DMALLOC_LIBS@"
|
||||
fi
|
||||
|
||||
|
||||
# Ok. If you are still with us, congratulations. Your reward for
|
||||
# this laudable persistence, is a behind the scenes glimpse at ...
|
||||
# our dirty laundry. Probably not what you were hoping for huh.
|
||||
# Me neither. Anyway, in this last pit of hell, you will find all
|
||||
# the machine or tool specific workarounds that require knowlege
|
||||
# not obtainable prior to passing this comment. The way of madness
|
||||
# lies below this comment, lets try to keep the path to a safe exit
|
||||
# as short and sweet as we can... our opening dilemma is:
|
||||
|
||||
# Resource compilers. A big wavy term that covers some pretty
|
||||
# dissimilar concepts on various platforms. The good news is,
|
||||
# each platform has only one definition of 'resource', compiled
|
||||
# or not, and so we can abstract that neatly to return a platform
|
||||
# specific invocation of the appropriate tool. The bad news is,
|
||||
# windres (at least) requires knowledge of the wx header files
|
||||
# location(s) that cannot be predicted reliably before the call to
|
||||
# wx-config is made. Currently for all known resource compilers,
|
||||
# we can simply return a command and some salient configuration
|
||||
# options in response to a request for --rescomp. So here we
|
||||
# top up the options for any tools that may require information
|
||||
# that was only just determined in the last few machine cycles,
|
||||
# then output the necessary incantation for the platform.
|
||||
#
|
||||
# Most things should already be constant by the time configure
|
||||
# has run. Do not add anything here that is already known there.
|
||||
|
||||
if [ -n "$output_option_rescomp" ]; then
|
||||
|
||||
case "@RESCOMP@" in
|
||||
*windres|wrc)
|
||||
# Note that with late model windres, we could just insert
|
||||
# _include_cppflags here, but use the old notation for now
|
||||
# as it is more universally accepted.
|
||||
if is_installed; then
|
||||
echo "@RESCOMP@ --include-dir" \
|
||||
"${includedir}/wx-@WX_RELEASE@@WX_FLAVOUR@" \
|
||||
"@WXCONFIG_RESFLAGS@"
|
||||
else
|
||||
echo "@RESCOMP@ --include-dir ${includedir}" \
|
||||
"--include-dir ${prefix}/contrib/include" \
|
||||
"@WXCONFIG_RESFLAGS@"
|
||||
fi
|
||||
;;
|
||||
|
||||
# neither rez not emxbind have any specific needs from
|
||||
# us, so just output what was determined by configure.
|
||||
*)
|
||||
echo @RESCOMP@ @WXCONFIG_RESFLAGS@
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# And so that's it, we're done. Have a nice build.
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user