Ticket #1094: auto-link-pkg-config.2.patch

File auto-link-pkg-config.2.patch, 3.4 KB (added by Roger Leigh <rleigh@…>, 12 years ago)

Updated patch (use anonymous namespace)

  • boost/config/auto_link.hpp

     
    8787#  define BOOST_DO_STRINGIZE(X) #X
    8888#endif
    8989//
    90 // Only include what follows for known and supported compilers:
     90// Unsupported compilers use pkg-config.
    9191//
    9292#if defined(BOOST_MSVC) \
    9393    || defined(__BORLANDC__) \
    9494    || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
    9595    || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
     96#undef BOOST_PKG_CONFIG
     97#else
     98#define BOOST_PKG_CONFIG 1
     99#endif
    96100
    97101#ifndef BOOST_VERSION_HPP
    98102#  include <boost/version.hpp>
     
    361365      && defined(BOOST_LIB_RT_OPT) \
    362366      && defined(BOOST_LIB_VERSION)
    363367
    364 #ifdef BOOST_AUTO_LINK_TAGGED
    365 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
    366 #  ifdef BOOST_LIB_DIAGNOSTIC
    367 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
     368#ifdef BOOST_PKG_CONFIG
     369#  ifdef BOOST_PKG_CONFIG_DUMP
     370#    ifndef BOOST_PKG_CONFIG_SETUP
     371#      define BOOST_PKG_CONFIG_SETUP
     372#      include <vector>
     373#      include <string>
     374namespace boost
     375{
     376  namespace pkg_config
     377  {
     378    struct library_list
     379    {
     380    public:
     381      static std::vector<std::string> list;
     382      library_list(const char *lib) { list.push_back(lib); }
     383    };
     384    std::vector<std::string> library_list::list;
     385  }
     386}
     387#    endif
     388
     389namespace
     390{
     391  boost::pkg_config::library_list BOOST_LIB_NAME (BOOST_STRINGIZE(BOOST_LIB_NAME));
     392}
    368393#  endif
     394#else
     395#  ifdef BOOST_AUTO_LINK_TAGGED
     396#    pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
     397#    ifdef BOOST_LIB_DIAGNOSTIC
     398#      pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
     399#    endif
    369400#elif defined(BOOST_AUTO_LINK_NOMANGLE)
    370 #  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
    371 #  ifdef BOOST_LIB_DIAGNOSTIC
    372 #     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
     401#    pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
     402#    ifdef BOOST_LIB_DIAGNOSTIC
     403#      pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
     404#    endif
     405#  else
     406#    pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
     407#    ifdef BOOST_LIB_DIAGNOSTIC
     408#      pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
     409#    endif
    373410#  endif
    374 #else
    375 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
    376 #  ifdef BOOST_LIB_DIAGNOSTIC
    377 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
    378 #  endif
    379411#endif
    380412
    381413#else
     
    383415#endif
    384416
    385417
    386 #endif // _MSC_VER || __BORLANDC__
    387418
    388419//
    389420// finally undef any macros we may have set: