From 486bde8372b30a2133e911268147704c699f8284 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 Feb 2012 11:01:52 +0100 Subject: make qlibraryinfo table-driven switch blocks are noisy. this is nicer. reshuffled the LibraryLocation enum to make table lookups possible and future-safe. using pointer-free tables to avoid adding data relocations. Change-Id: I70ec2c2142ce02a15e67284e4b285d754d930da3 Reviewed-by: Thiago Macieira --- configure | 65 +++++++++++++++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 35 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 3101982f84..7aa8adaa43 100755 --- a/configure +++ b/configure @@ -3995,36 +3995,40 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE) /* Installation Info */ -static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$QT_HOST_PREFIX"; -static const char qt_configure_documentation_path_str[256 + 12] = "qt_docspath=$QT_HOST_PREFIX/doc"; -static const char qt_configure_headers_path_str [256 + 12] = "qt_hdrspath=$QT_HOST_PREFIX/include"; -static const char qt_configure_libraries_path_str [256 + 12] = "qt_libspath=$QT_HOST_PREFIX/lib"; -static const char qt_configure_binaries_path_str [256 + 12] = "qt_binspath=$QT_HOST_PREFIX/bin"; -static const char qt_configure_plugins_path_str [256 + 12] = "qt_plugpath=$QT_HOST_PREFIX/plugins"; -static const char qt_configure_imports_path_str [256 + 12] = "qt_impspath=$QT_HOST_PREFIX/IMPORTS"; -static const char qt_configure_data_path_str [256 + 12] = "qt_datapath=$QT_HOST_PREFIX"; -static const char qt_configure_translations_path_str [256 + 12] = "qt_trnspath=$QT_HOST_PREFIX/translations"; -static const char qt_configure_settings_path_str [256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS"; -static const char qt_configure_examples_path_str [256 + 12] = "qt_xmplpath=$QT_INSTALL_EXAMPLES"; -static const char qt_configure_tests_path_str [256 + 12] = "qt_tstspath=$QT_INSTALL_TESTS"; +static const char qt_configure_prefix_path_strs[][256 + 12] = { + "qt_prfxpath=$QT_HOST_PREFIX", + "qt_docspath=$QT_HOST_PREFIX/doc", + "qt_hdrspath=$QT_HOST_PREFIX/include", + "qt_libspath=$QT_HOST_PREFIX/lib", + "qt_binspath=$QT_HOST_PREFIX/bin", + "qt_plugpath=$QT_HOST_PREFIX/plugins", + "qt_impspath=$QT_HOST_PREFIX/IMPORTS", + "qt_datapath=$QT_HOST_PREFIX", + "qt_trnspath=$QT_HOST_PREFIX/translations", + "qt_xmplpath=$QT_INSTALL_EXAMPLES", + "qt_tstspath=$QT_INSTALL_TESTS", +}; +static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS"; #else // QT_BOOTSTRAPPED EOF fi cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <> "$outpath/src/corelib/global/qconfig.cpp.new" <