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

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/include/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: 24th December 2005
00008  *
00009  * Home:    http://recls.org/
00010  *
00011  * Copyright (c) 2005, 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 
00045 #ifndef RECLS_INCL_RECLS_H_IMPLICIT_LINK
00046 #define RECLS_INCL_RECLS_H_IMPLICIT_LINK
00047 
00048 /* 
00049  * Version information
00050  */
00051 
00052 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00053 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_MAJOR      1
00054 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_MINOR      0
00055 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_REVISION   2
00056 # define RECLS_VER_RECLS_H_IMPLICIT_LINK_EDIT       3
00057 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00058 
00059 /* 
00060  * Includes
00061  */
00062 
00063 #ifndef RECLS_INCL_RECLS_H_RECLS
00064 # include <recls/recls.h>
00065 #endif /* !RECLS_INCL_RECLS_H_RECLS */
00066 
00067 /* 
00068  * Implicit linking
00069  */
00070 
00071 #if defined(WIN32) || \
00072     defined(_WIN32)
00073 
00074 # if defined(__BORLANDC__) || \
00075      /* defined(__DMC__) || */ \
00076      defined(__INTEL_COMPILER) || \
00077      defined(__MWERKS__) || \
00078      defined(_MSC_VER)
00079 #  define RECLS_IMPLICIT_LINK_SUPPORT
00080 # endif /* compiler */
00081 
00082 
00083 # if defined(RECLS_IMPLICIT_LINK_SUPPORT)
00084 
00085 #  if defined(__BORLANDC__)
00086 #   if __BORLANDC__ == 0x0550
00087 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc55"
00088 #   elif (__BORLANDC__ == 0x0551)
00089 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc551"
00090 #   elif (__BORLANDC__ == 0x0560)
00091 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc56"
00092 #   elif (__BORLANDC__ == 0x0564)
00093 #    define RECLS_IMPL_LINK_COMPILER_NAME           "bc564"
00094 #   else /* ? __BORLANDC__ */
00095 #    error Unrecognised value of __BORLANDC__
00096 #   endif /* __BORLANDC__ */
00097 
00098 /*
00099 #  elif defined(__DMC__)
00100 #   define RECLS_IMPL_LINK_COMPILER_NAME            "dm"
00101  */
00102 
00103 #  elif defined(__INTEL_COMPILER)
00104 #   if (__INTEL_COMPILER == 600)
00105 #    define RECLS_IMPL_LINK_COMPILER_NAME           "icl6"
00106 #   elif (__INTEL_COMPILER == 700)
00107 #    define RECLS_IMPL_LINK_COMPILER_NAME           "icl7"
00108 #   elif (__INTEL_COMPILER == 800)
00109 #    define RECLS_IMPL_LINK_COMPILER_NAME           "icl8"
00110 #   else /* ? __INTEL_COMPILER */
00111 #    error Unrecognised value of __INTEL_COMPILER
00112 #   endif /* __INTEL_COMPILER */
00113 
00114 #  elif defined(__MWERKS__)
00115 #   if ((__MWERKS__ & 0xFF00) == 0x2400)
00116 #    define RECLS_IMPL_LINK_COMPILER_NAME           "cw7"
00117 #   elif ((__MWERKS__ & 0xFF00) == 0x3000)
00118 #    define RECLS_IMPL_LINK_COMPILER_NAME           "cw8"
00119 #   elif ((__MWERKS__ & 0xFF00) == 0x3200)
00120 #    define RECLS_IMPL_LINK_COMPILER_NAME           "cw9"
00121 #   else /* ? __MWERKS__ */
00122 #    error Unrecognised value of __MWERKS__
00123 #   endif /* __MWERKS__ */
00124 
00125 #  elif defined(_MSC_VER)
00126 #   if _MSC_VER == 1000
00127 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc4"
00128 #   elif _MSC_VER == 1020
00129 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc42"
00130 #   elif _MSC_VER == 1100
00131 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc5"
00132 #   elif _MSC_VER == 1200
00133 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc6"
00134 #   elif _MSC_VER == 1300
00135 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc7"
00136 #   elif _MSC_VER == 1310
00137 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc71"
00138 #   elif _MSC_VER == 1400
00139 #    define RECLS_IMPL_LINK_COMPILER_NAME           "vc8"
00140 #   else /* ? _MSC_VER */
00141 #    error Unrecognised value of _MSC_VER
00142 #   endif /* _MSC_VER */
00143 
00144 #  else /* ? compiler */
00145 #   error Unrecognised compiler
00146 #  endif /* compiler */
00147 
00148 
00149 # if defined(__MT__) || \
00150      defined(_REENTRANT) || \
00151      defined(_MT)
00152 #  if defined(_DLL) || \
00153       defined(__DLL)
00154 #   define RECLS_IMPL_LINK_THREADING_TYPE           ".dll"
00155 #  else /* ? dll */
00156 #   define RECLS_IMPL_LINK_THREADING_TYPE           ".mt"
00157 #  endif /* dll */
00158 # else /* ? mt */
00159 #   define RECLS_IMPL_LINK_THREADING_TYPE           ""
00160 # endif /* mt */
00161 
00162 
00163 # if !defined(NDEBUG) && \
00164      defined(_DEBUG)
00165 #  define RECLS_IMPL_LINK_DEBUG_TYPE                ".debug"
00166 # else /* ? debug */
00167 #  define RECLS_IMPL_LINK_DEBUG_TYPE                ""
00168 # endif /* debug */
00169 
00170 #  define RECLS_IMPL_LINK_LIBRARY_BASENAME_s_(x)    #x
00171 #  define RECLS_IMPL_LINK_LIBRARY_BASENAME_s(x)     RECLS_IMPL_LINK_LIBRARY_BASENAME_s_(x)
00172 #  define RECLS_IMPL_LINK_LIBRARY_BASENAME          "recls." RECLS_IMPL_LINK_LIBRARY_BASENAME_s(RECLS_VER_MAJOR) "."
00173 
00174 #  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"
00175 
00176 #  pragma message("lib: " RECLS_IMPL_LINK_LIBRARY_NAME)
00177 
00178 #  pragma comment(lib, RECLS_IMPL_LINK_LIBRARY_NAME)
00179 
00180 # endif /* RECLS_IMPLICIT_LINK_SUPPORT */
00181 
00182 #endif /* Win32 */
00183 
00184 /* 
00185 
00186 #endif /* !RECLS_INCL_RECLS_H_IMPLICIT_LINK */
00187 
00188 /* 

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