C/C++ User's Journal STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - where the Standard Template Library meets the Active Template Library COMSTL - where the Standard Template Library meets the Component Object Model
Synesis Software InetSTL - where the Standard Template Library meets the Internet UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

recls/implicit_link.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:    recls/implicit_link.h
00003  *
00004  * Purpose: Implicit linking for the recls API
00005  *
00006  * Created: 20th September 2005
00007  * Updated: 5th October 2006
00008  *
00009  * Home:    http://recls.org/
00010  *
00011  * Copyright (c) 2005-2006, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without
00015  * modification, are permitted provided that the following conditions are met:
00016  *
00017  * - Redistributions of source code must retain the above copyright notice, this
00018  *   list of conditions and the following disclaimer.
00019  * - Redistributions in binary form must reproduce the above copyright notice,
00020  *   this list of conditions and the following disclaimer in the documentation
00021  *   and/or other materials provided with the distribution.
00022  * - Neither the names of Matthew Wilson and Synesis Software nor the names of
00023  *   any contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00027  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00029  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00030  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00031  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00032  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00033  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00034  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00036  * POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * ////////////////////////////////////////////////////////////////////////// */
00039 
00040 
00046 #ifndef RECLS_INCL_RECLS_H_IMPLICIT_LINK
00047 #define RECLS_INCL_RECLS_H_IMPLICIT_LINK
00048 
00049 /* /////////////////////////////////////////////////////////////////////////////
00050  * Version information
00051  */
00052 
00053 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00054 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_MAJOR      1
00055 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_MINOR      0
00056 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_REVISION   3
00057 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_EDIT       5
00058 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00059 
00060 /* /////////////////////////////////////////////////////////////////////////////
00061  * Includes
00062  */
00063 
00064 #ifndef RECLS_INCL_RECLS_H_RECLS
00065 # include <recls/recls.h>
00066 #endif /* !RECLS_INCL_RECLS_H_RECLS */
00067 
00068 /* /////////////////////////////////////////////////////////////////////////////
00069  * Implicit linking
00070  */
00071 
00072 #if defined(WIN32) || \
00073     defined(_WIN32)
00074 
00075 # if defined(__BORLANDC__) || \
00076      /* defined(__DMC__) || */ \
00077      defined(__INTEL_COMPILER) || \
00078      defined(__MWERKS__) || \
00079      defined(_MSC_VER)
00080 #  define RECLS_IMPLICIT_LINK_SUPPORT
00081 # endif /* compiler */
00082 
00083 #if defined(RECLS_IMPLICIT_LINK_SUPPORT) && \
00084     defined(RECLS_NO_IMPLICIT_LINK)
00085 # undef RECLS_IMPLICIT_LINK_SUPPORT
00086 #endif /* RECLS_IMPLICIT_LINK_SUPPORT && RECLS_NO_IMPLICIT_LINK */
00087 
00088 # if defined(RECLS_IMPLICIT_LINK_SUPPORT)
00089 
00090 #  if defined(__BORLANDC__)
00091 #   if __BORLANDC__ == 0x0550
00092 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc55"
00093 #   elif (__BORLANDC__ == 0x0551)
00094 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc551"
00095 #   elif (__BORLANDC__ == 0x0560)
00096 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc56"
00097 #   elif (__BORLANDC__ == 0x0564)
00098 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc564"
00099 #   else /* ? __BORLANDC__ */
00100 #    error Unrecognised value of __BORLANDC__
00101 #   endif /* __BORLANDC__ */
00102 
00103 /*
00104 #  elif defined(__DMC__)
00105 #   define RECLS_IMPL_LINK_COMPILER_NAME            "dm"
00106  */
00107 
00108 #  elif defined(__INTEL_COMPILER)
00109 #   if (__INTEL_COMPILER == 600)
00110 #    define RECLS_IMPL_LINK_COMPILER_NAME           "icl6"
00111 #   elif (__INTEL_COMPILER == 700)
00112 #    define RECLS_IMPL_LINK_COMPILER_NAME           "icl7"
00113 #   elif (__INTEL_COMPILER == 800)
00114 #    define RECLS_IMPL_LINK_COMPILER_NAME           "icl8"
00115 #   else /* ? __INTEL_COMPILER */
00116 #    error Unrecognised value of __INTEL_COMPILER
00117 #   endif /* __INTEL_COMPILER */
00118 
00119 #  elif defined(__MWERKS__)
00120 #   if ((__MWERKS__ & 0xFF00) == 0x2400)
00121 #    define RECLS_IMPL_LINK_COMPILER_NAME           "cw7"
00122 #   elif ((__MWERKS__ & 0xFF00) == 0x3000)
00123 #    define RECLS_IMPL_LINK_COMPILER_NAME           "cw8"
00124 #   elif ((__MWERKS__ & 0xFF00) == 0x3200)
00125 #    define RECLS_IMPL_LINK_COMPILER_NAME           "cw9"
00126 #   else /* ? __MWERKS__ */
00127 #    error Unrecognised value of __MWERKS__
00128 #   endif /* __MWERKS__ */
00129 
00130 #  elif defined(_MSC_VER)
00131 #   if _MSC_VER == 1000
00132 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc4"
00133 #   elif _MSC_VER == 1020
00134 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc42"
00135 #   elif _MSC_VER == 1100
00136 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc5"
00137 #   elif _MSC_VER == 1200
00138 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc6"
00139 #   elif _MSC_VER == 1300
00140 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc7"
00141 #   elif _MSC_VER == 1310
00142 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc71"
00143 #   elif _MSC_VER == 1400
00144 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc8"
00145 #   else /* ? _MSC_VER */
00146 #    error Unrecognised value of _MSC_VER
00147 #   endif /* _MSC_VER */
00148 
00149 #  else /* ? compiler */
00150 #   error Unrecognised compiler
00151 #  endif /* compiler */
00152 
00153 
00154 # if defined(__MT__) || \
00155      defined(_REENTRANT) || \
00156      defined(_MT)
00157 #  if defined(_DLL) || \
00158       defined(__DLL)
00159 #   define RECLS_IMPL_LINK_THREADING_TYPE           ".dll"
00160 #  else /* ? dll */
00161 #   define RECLS_IMPL_LINK_THREADING_TYPE           ".mt"
00162 #  endif /* dll */
00163 # else /* ? mt */
00164 #   define RECLS_IMPL_LINK_THREADING_TYPE           ""
00165 # endif /* mt */
00166 
00167 
00168 # if !defined(NDEBUG) && \
00169      defined(_DEBUG)
00170 #  define RECLS_IMPL_LINK_DEBUG_TYPE                ".debug"
00171 # else /* ? debug */
00172 #  define RECLS_IMPL_LINK_DEBUG_TYPE                ""
00173 # endif /* debug */
00174 
00175 #  define RECLS_IMPL_LINK_LIBRARY_BASENAME_s_(x)    #x
00176 #  define RECLS_IMPL_LINK_LIBRARY_BASENAME_s(x)     RECLS_IMPL_LINK_LIBRARY_BASENAME_s_(x)
00177 #  define RECLS_IMPL_LINK_LIBRARY_BASENAME          "recls." RECLS_IMPL_LINK_LIBRARY_BASENAME_s(RECLS_VER_MAJOR) "."
00178 
00179 #  define RECLS_IMPL_LINK_LIBRARY_NAME              RECLS_IMPL_LINK_LIBRARY_BASENAME RECLS_IMPL_LINK_COMPILER_NAME RECLS_IMPL_LINK_THREADING_TYPE RECLS_IMPL_LINK_DEBUG_TYPE ".lib"
00180 
00181 #  pragma message("lib: " RECLS_IMPL_LINK_LIBRARY_NAME)
00182 
00183 #  pragma comment(lib, RECLS_IMPL_LINK_LIBRARY_NAME)
00184 
00185 # endif /* RECLS_IMPLICIT_LINK_SUPPORT */
00186 
00187 #endif /* Win32 */
00188 
00189 /* ////////////////////////////////////////////////////////////////////////// */
00190 
00191 #endif /* !RECLS_INCL_RECLS_H_IMPLICIT_LINK */
00192 
00193 /* ////////////////////////////////////////////////////////////////////////// */

recls Library documentation © Synesis Software Pty Ltd, 2001-2006