/*
 * buildopts.h
 *
 * Build options generated by the configure script.
 *
 * Portable Windows Library
 *
 * Copyright (c) 2003 Equivalence Pty. Ltd.
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 * the License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is Portable Windows Library.
 *
 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
 *
 * Contributor(s): ______________________________________.
 *
 * $Revision: 22069 $
 * $Author: rjongbloed $
 * $Date: 2009-02-16 01:01:51 +0000 (Mon, 16 Feb 2009) $
 */

#ifndef PTLIB_BUILDOPTS_H
#define PTLIB_BUILDOPTS_H


#undef    PTLIB_MAJOR
#undef    PTLIB_MINOR
#undef    PTLIB_BUILD
#undef    PTLIB_VERSION

/////////////////////////////////////////////////
//
// host type
//

#undef    P_LINUX
#undef    P_FREEBSD
#undef    P_OPENBSD
#undef    P_NETBSD
#undef    P_SOLARIS
#undef    P_MACOSX
#undef    P_CYGWIN
#undef    P_MINGW
#undef    P_UNKNOWN_OS 

// Windows API version for compile
#undef    WINVER


/////////////////////////////////////////////////
//
// sizeof(int)
//

#undef SIZEOF_INT
#undef    P_64BIT
#undef    PNO_LONG_DOUBLE

/////////////////////////////////////////////////
//
// Processor endianess
//

#if !defined(P_MACOSX)
  #undef PBYTE_ORDER
#else
  #if defined(__BIG_ENDIAN__)
    #define PBYTE_ORDER PBIG_ENDIAN
  #else
    #define PBYTE_ORDER PLITTLE_ENDIAN
  #endif
#endif

/////////////////////////////////////////////////
//
// Runtime dynamic link libraries
//

#undef P_DYNALINK
#undef P_PLUGINS
#undef P_DEFAULT_PLUGIN_DIR

/////////////////////////////////////////////////
//
// PThreads and related vars
//

#undef P_PTHREADS
#undef P_HAS_SEMAPHORES
#undef P_HAS_NAMED_SEMAPHORES
#undef P_PTHREADS_XPG6      
#undef P_HAS_SEMAPHORES_XPG6
#undef P_EXCEPTIONS


/////////////////////////////////////////////////
//
// various non-core functions
//

#undef P_AUDIO
#undef P_VIDEO

#undef P_REGEX
#undef P_TTS
#undef P_ASN
#undef P_STUN
#undef P_PIPECHAN
#undef P_DTMF
#undef P_WAVFILE
#undef P_SOCKS
#undef P_FTP
#undef P_SNMP
#undef P_TELNET
#undef P_REMCONN
#undef P_SERIAL
#undef P_POP3SMTP

#undef P_CONFIG_FILE
#undef P_URL
#ifdef P_URL
  #undef P_HTTP
  #ifdef P_HTTP
    #undef P_HTTPFORMS
    #undef P_HTTPSVC
  #endif
#endif

#undef P_SOCKAGG
#undef P_VIDFILE
#undef P_FFVDEV
#undef P_ODBC
#undef P_SHM_VIDEO

#undef P_LPIA
#undef P_HAS_POSIX_READDIR_R
#undef P_HAS_STL_STREAMS
#undef P_HAS_ATOMIC_INT
#undef P_HAS_RECURSIVE_MUTEX
#undef P_NEEDS_GNU_CXX_NAMESPACE
#undef PMEMORY_CHECK
#undef P_HAS_RECVMSG
#undef P_HAS_UPAD128_T
#undef P_HAS_INET_NTOP


/////////////////////////////////////////////////
//
// IP v6 Support
//

#ifndef _WIN32_WCE
  #undef P_HAS_IPV6
#endif //  _WIN32_WCE

#if defined(_MSC_VER) && P_HAS_IPV6

  #pragma include_alias(<winsock2.h>, <@IPV6_DIR@/winsock2.h>)
  #pragma include_alias(<ws2tcpip.h>, <@IPV6_DIR@/ws2tcpip.h>)

  #define P_WINSOCK2_LIBRARY "ws2_32.lib"

#endif


/////////////////////////////////////////////////
//
// QoS Support
//
//

#ifndef _WIN32_WCE
  #undef P_QOS
#endif //  _WIN32_WCE

#if defined(_MSC_VER) && P_QOS

  #pragma include_alias(<qossp.h>, <@QOS_DIR@/qossp.h>)

  #define P_WINSOCK2_LIBRARY "ws2_32.lib"

#endif


/////////////////////////////////////////////////
//
// OpenSSL library for secure sockets layer
//

#undef P_OSSL 
#undef P_OSSL_AES
#undef P_SSL_USE_CONST

#if defined(P_OSSL) && !defined(_WIN32_WCE)
  #define P_SSL 1

  #ifdef P_OSSL_AES
    #define P_SSL_AES 1
  #endif
#endif

#if defined(_MSC_VER) && P_SSL

  #if P_OSSL==2

    #define P_SSL_USE_CONST 1

    #pragma include_alias(<openssl/ssl.h>,        <@SSL_DIR@/include/openssl/ssl.h>)
    #pragma include_alias(<openssl/safestack.h>,  <@SSL_DIR@/include/openssl/safestack.h>)
    #pragma include_alias(<openssl/stack.h>,      <@SSL_DIR@/include/openssl/stack.h>)
    #pragma include_alias(<openssl/crypto.h>,     <@SSL_DIR@/include/openssl/crypto.h>)
    #pragma include_alias(<openssl/opensslv.h>,   <@SSL_DIR@/include/openssl/opensslv.h>)
    #pragma include_alias(<openssl/lhash.h>,      <@SSL_DIR@/include/openssl/lhash.h>)
    #pragma include_alias(<openssl/buffer.h>,     <@SSL_DIR@/include/openssl/buffer.h>)
    #pragma include_alias(<openssl/bio.h>,        <@SSL_DIR@/include/openssl/bio.h>)
    #pragma include_alias(<openssl/pem.h>,        <@SSL_DIR@/include/openssl/pem.h>)
    #pragma include_alias(<openssl/evp.h>,        <@SSL_DIR@/include/openssl/evp.h>)
    #pragma include_alias(<openssl/md2.h>,        <@SSL_DIR@/include/openssl/md2.h>)
    #pragma include_alias(<openssl/opensslconf.h>,<@SSL_DIR@/include/openssl/opensslconf.h>)
    #pragma include_alias(<openssl/md5.h>,        <@SSL_DIR@/include/openssl/md5.h>)
    #pragma include_alias(<openssl/sha.h>,        <@SSL_DIR@/include/openssl/sha.h>)
    #pragma include_alias(<openssl/ripemd.h>,     <@SSL_DIR@/include/openssl/ripemd.h>)
    #pragma include_alias(<openssl/des.h>,        <@SSL_DIR@/include/openssl/des.h>)
    #pragma include_alias(<openssl/e_os2.h>,      <@SSL_DIR@/include/openssl/e_os2.h>)
    #pragma include_alias(<openssl/rc4.h>,        <@SSL_DIR@/include/openssl/rc4.h>)
    #pragma include_alias(<openssl/rc2.h>,        <@SSL_DIR@/include/openssl/rc2.h>)
    #pragma include_alias(<openssl/rc5.h>,        <@SSL_DIR@/include/openssl/rc5.h>)
    #pragma include_alias(<openssl/blowfish.h>,   <@SSL_DIR@/include/openssl/blowfish.h>)
    #pragma include_alias(<openssl/cast.h>,       <@SSL_DIR@/include/openssl/cast.h>)
    #pragma include_alias(<openssl/idea.h>,       <@SSL_DIR@/include/openssl/idea.h>)
    #pragma include_alias(<openssl/mdc2.h>,       <@SSL_DIR@/include/openssl/mdc2.h>)
    #pragma include_alias(<openssl/rsa.h>,        <@SSL_DIR@/include/openssl/rsa.h>)
    #pragma include_alias(<openssl/bn.h>,         <@SSL_DIR@/include/openssl/bn.h>)
    #pragma include_alias(<openssl/dsa.h>,        <@SSL_DIR@/include/openssl/dsa.h>)
    #pragma include_alias(<openssl/dh.h>,         <@SSL_DIR@/include/openssl/dh.h>)
    #pragma include_alias(<openssl/objects.h>,    <@SSL_DIR@/include/openssl/objects.h>)
    #pragma include_alias(<openssl/asn1.h>,       <@SSL_DIR@/include/openssl/asn1.h>)
    #pragma include_alias(<openssl/x509.h>,       <@SSL_DIR@/include/openssl/x509.h>)
    #pragma include_alias(<openssl/x509_vfy.h>,   <@SSL_DIR@/include/openssl/x509_vfy.h>)
    #pragma include_alias(<openssl/pkcs7.h>,      <@SSL_DIR@/include/openssl/pkcs7.h>)
    #pragma include_alias(<openssl/pem2.h>,       <@SSL_DIR@/include/openssl/pem2.h>)
    #pragma include_alias(<openssl/ssl2.h>,       <@SSL_DIR@/include/openssl/ssl2.h>)
    #pragma include_alias(<openssl/ssl3.h>,       <@SSL_DIR@/include/openssl/ssl3.h>)
    #pragma include_alias(<openssl/tls1.h>,       <@SSL_DIR@/include/openssl/tls1.h>)
    #pragma include_alias(<openssl/ssl23.h>,      <@SSL_DIR@/include/openssl/ssl23.h>)
    #pragma include_alias(<openssl/err.h>,        <@SSL_DIR@/include/openssl/err.h>)
    #pragma include_alias(<openssl/rand.h>,       <@SSL_DIR@/include/openssl/rand.h>)
    #pragma include_alias(<openssl/symhacks.h>,   <@SSL_DIR@/include/openssl/symhacks.h>)
    #pragma include_alias(<openssl/comp.h>,       <@SSL_DIR@/include/openssl/comp.h>)
    #pragma include_alias(<openssl/ossl_typ.h>,   <@SSL_DIR@/include/openssl/ossl_typ.h>)
    #pragma include_alias(<openssl/md4.h>,        <@SSL_DIR@/include/openssl/md4.h>)
    #pragma include_alias(<openssl/des_old.h>,    <@SSL_DIR@/include/openssl/des_old.h>)
    #pragma include_alias(<openssl/ui_compat.h>,  <@SSL_DIR@/include/openssl/ui_compat.h>)
    #pragma include_alias(<openssl/ui.h>,         <@SSL_DIR@/include/openssl/ui.h>)
    #pragma include_alias(<openssl/aes.h>,        <@SSL_DIR@/include/openssl/aes.h>)
    #pragma include_alias(<openssl/obj_mac.h>,    <@SSL_DIR@/include/openssl/obj_mac.h>)
    #pragma include_alias(<openssl/kssl.h>,       <@SSL_DIR@/include/openssl/kssl.h>)
    #pragma include_alias(<openssl/ec.h>,         <@SSL_DIR@/include/openssl/ec.h>)
    #pragma include_alias(<openssl/ecdsa.h>,      <@SSL_DIR@/include/openssl/ecdsa.h>)
    #pragma include_alias(<openssl/ecdh.h>,       <@SSL_DIR@/include/openssl/ecdh.h>)
    #pragma include_alias(<openssl/pq_compat.h>,  <@SSL_DIR@/include/openssl/pq_compat.h>)
    #pragma include_alias(<openssl/dtls1.h>,      <@SSL_DIR@/include/openssl/dtls1.h>)
    #pragma include_alias(<openssl/pqueue.h>,     <@SSL_DIR@/include/openssl/pqueue.h>)

    #ifdef P_OSSL_AES
      #pragma include_alias(<openssl/aes.h>,      <@SSL_DIR@/include/openssl/aes.h>)
    #endif

    #ifdef _DEBUG
      #define P_SSL_LIB1 "@SSL_DIR@/lib/VC/libeay32MTd.lib"
      #define P_SSL_LIB2 "@SSL_DIR@/lib/VC/ssleay32MTd.lib"
    #else
      #define P_SSL_LIB1 "@SSL_DIR@/lib/VC/libeay32MT.lib"
      #define P_SSL_LIB2 "@SSL_DIR@/lib/VC/ssleay32MT.lib"
    #endif

  #else

    #pragma include_alias(<openssl/ssl.h>,        <@SSL_DIR@/inc32/openssl/ssl.h>)
    #pragma include_alias(<openssl/safestack.h>,  <@SSL_DIR@/inc32/openssl/safestack.h>)
    #pragma include_alias(<openssl/stack.h>,      <@SSL_DIR@/inc32/openssl/stack.h>)
    #pragma include_alias(<openssl/crypto.h>,     <@SSL_DIR@/inc32/openssl/crypto.h>)
    #pragma include_alias(<openssl/opensslv.h>,   <@SSL_DIR@/inc32/openssl/opensslv.h>)
    #pragma include_alias(<openssl/lhash.h>,      <@SSL_DIR@/inc32/openssl/lhash.h>)
    #pragma include_alias(<openssl/buffer.h>,     <@SSL_DIR@/inc32/openssl/buffer.h>)
    #pragma include_alias(<openssl/bio.h>,        <@SSL_DIR@/inc32/openssl/bio.h>)
    #pragma include_alias(<openssl/pem.h>,        <@SSL_DIR@/inc32/openssl/pem.h>)
    #pragma include_alias(<openssl/evp.h>,        <@SSL_DIR@/inc32/openssl/evp.h>)
    #pragma include_alias(<openssl/md2.h>,        <@SSL_DIR@/inc32/openssl/md2.h>)
    #pragma include_alias(<openssl/opensslconf.h>,<@SSL_DIR@/inc32/openssl/opensslconf.h>)
    #pragma include_alias(<openssl/md5.h>,        <@SSL_DIR@/inc32/openssl/md5.h>)
    #pragma include_alias(<openssl/sha.h>,        <@SSL_DIR@/inc32/openssl/sha.h>)
    #pragma include_alias(<openssl/ripemd.h>,     <@SSL_DIR@/inc32/openssl/ripemd.h>)
    #pragma include_alias(<openssl/des.h>,        <@SSL_DIR@/inc32/openssl/des.h>)
    #pragma include_alias(<openssl/e_os2.h>,      <@SSL_DIR@/inc32/openssl/e_os2.h>)
    #pragma include_alias(<openssl/rc4.h>,        <@SSL_DIR@/inc32/openssl/rc4.h>)
    #pragma include_alias(<openssl/rc2.h>,        <@SSL_DIR@/inc32/openssl/rc2.h>)
    #pragma include_alias(<openssl/rc5.h>,        <@SSL_DIR@/inc32/openssl/rc5.h>)
    #pragma include_alias(<openssl/blowfish.h>,   <@SSL_DIR@/inc32/openssl/blowfish.h>)
    #pragma include_alias(<openssl/cast.h>,       <@SSL_DIR@/inc32/openssl/cast.h>)
    #pragma include_alias(<openssl/idea.h>,       <@SSL_DIR@/inc32/openssl/idea.h>)
    #pragma include_alias(<openssl/mdc2.h>,       <@SSL_DIR@/inc32/openssl/mdc2.h>)
    #pragma include_alias(<openssl/rsa.h>,        <@SSL_DIR@/inc32/openssl/rsa.h>)
    #pragma include_alias(<openssl/bn.h>,         <@SSL_DIR@/inc32/openssl/bn.h>)
    #pragma include_alias(<openssl/dsa.h>,        <@SSL_DIR@/inc32/openssl/dsa.h>)
    #pragma include_alias(<openssl/dh.h>,         <@SSL_DIR@/inc32/openssl/dh.h>)
    #pragma include_alias(<openssl/objects.h>,    <@SSL_DIR@/inc32/openssl/objects.h>)
    #pragma include_alias(<openssl/asn1.h>,       <@SSL_DIR@/inc32/openssl/asn1.h>)
    #pragma include_alias(<openssl/x509.h>,       <@SSL_DIR@/inc32/openssl/x509.h>)
    #pragma include_alias(<openssl/x509_vfy.h>,   <@SSL_DIR@/inc32/openssl/x509_vfy.h>)
    #pragma include_alias(<openssl/pkcs7.h>,      <@SSL_DIR@/inc32/openssl/pkcs7.h>)
    #pragma include_alias(<openssl/pem2.h>,       <@SSL_DIR@/inc32/openssl/pem2.h>)
    #pragma include_alias(<openssl/ssl2.h>,       <@SSL_DIR@/inc32/openssl/ssl2.h>)
    #pragma include_alias(<openssl/ssl3.h>,       <@SSL_DIR@/inc32/openssl/ssl3.h>)
    #pragma include_alias(<openssl/tls1.h>,       <@SSL_DIR@/inc32/openssl/tls1.h>)
    #pragma include_alias(<openssl/ssl23.h>,      <@SSL_DIR@/inc32/openssl/ssl23.h>)
    #pragma include_alias(<openssl/err.h>,        <@SSL_DIR@/inc32/openssl/err.h>)
    #pragma include_alias(<openssl/rand.h>,       <@SSL_DIR@/inc32/openssl/rand.h>)
    #pragma include_alias(<openssl/symhacks.h>,   <@SSL_DIR@/inc32/openssl/symhacks.h>)
    #pragma include_alias(<openssl/comp.h>,       <@SSL_DIR@/inc32/openssl/comp.h>)
    #pragma include_alias(<openssl/ossl_typ.h>,   <@SSL_DIR@/inc32/openssl/ossl_typ.h>)
    #pragma include_alias(<openssl/md4.h>,        <@SSL_DIR@/inc32/openssl/md4.h>)
    #pragma include_alias(<openssl/des_old.h>,    <@SSL_DIR@/inc32/openssl/des_old.h>)
    #pragma include_alias(<openssl/ui_compat.h>,  <@SSL_DIR@/inc32/openssl/ui_compat.h>)
    #pragma include_alias(<openssl/ui.h>,         <@SSL_DIR@/inc32/openssl/ui.h>)
    #pragma include_alias(<openssl/aes.h>,        <@SSL_DIR@/inc32/openssl/aes.h>)
    #pragma include_alias(<openssl/obj_mac.h>,    <@SSL_DIR@/inc32/openssl/obj_mac.h>)
    #pragma include_alias(<openssl/kssl.h>,       <@SSL_DIR@/inc32/openssl/kssl.h>)
    #pragma include_alias(<openssl/ec.h>,         <@SSL_DIR@/inc32/openssl/ec.h>)
    #pragma include_alias(<openssl/ecdsa.h>,      <@SSL_DIR@/inc32/openssl/ecdsa.h>)
    #pragma include_alias(<openssl/ecdh.h>,       <@SSL_DIR@/inc32/openssl/ecdh.h>)
    #pragma include_alias(<openssl/pq_compat.h>,  <@SSL_DIR@/inc32/openssl/pq_compat.h>)
    #pragma include_alias(<openssl/dtls1.h>,      <@SSL_DIR@/inc32/openssl/dtls1.h>)
    #pragma include_alias(<openssl/pqueue.h>,     <@SSL_DIR@/inc32/openssl/pqueue.h>)

    #ifdef P_OSSL_AES
      #pragma include_alias(<openssl/aes.h>,      <@SSL_DIR@/inc32/openssl/aes.h>)
    #endif

    #ifdef _DEBUG
      #define P_SSL_LIBDIR "out32.dbg"
    #else
      #define P_SSL_LIBDIR "out32"
    #endif

    #define P_SSL_LIB1 "@SSL_DIR@/" P_SSL_LIBDIR "/ssleay32.lib"
    #define P_SSL_LIB2 "@SSL_DIR@/" P_SSL_LIBDIR "/libeay32.lib"

  #endif

#endif


/////////////////////////////////////////////////
//
// EXPAT library for XML parsing
//

#undef P_OEXPAT
#undef P_WINEXPAT

#if P_OEXPAT
  #define P_EXPAT 1
#endif

#if defined(_MSC_VER) && defined(P_WINEXPAT)

  #if P_WINEXPAT==1

    #ifndef _WIN32_WCE 

      #if defined(_DEBUG)
      
        #undef P_EXPAT_LIBRARY_W32_DEBUG
        #ifdef P_EXPAT_LIBRARY_W32_DEBUG
          #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_W32_DEBUG
        #endif
        
      #else
      
        #undef P_EXPAT_LIBRARY_W32_RELEASE
        #ifdef P_EXPAT_LIBRARY_W32_RELEASE
          #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_W32_RELEASE
        #endif
        
      #endif

    #elif _WIN32_WCE < 0x502

      #if defined(_DEBUG)
      
        #undef P_EXPAT_LIBRARY_WM5_DEBUG
        #ifdef P_EXPAT_LIBRARY_WM5_DEBUG
          #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_WM5_DEBUG
        #endif
        
      #else
      
        #undef P_EXPAT_LIBRARY_WM5_RELEASE
        #ifdef P_EXPAT_LIBRARY_WM5_RELEASE
          #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_WM5_RELEASE
        #endif
        
      #endif
        
    #else
      
      #if defined(_DEBUG)
      
        #undef P_EXPAT_LIBRARY_WM6_DEBUG
        #ifdef P_EXPAT_LIBRARY_WM6_DEBUG
          #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_WM6_DEBUG
        #endif
        
      #else
      
        #undef P_EXPAT_LIBRARY_WM6_RELEASE
        #ifdef P_EXPAT_LIBRARY_WM6_RELEASE
          #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_WM6_RELEASE
        #endif
        
      #endif
        
    #endif

    #ifdef P_EXPAT_LIBRARY
      #pragma include_alias(<expat.h>, <@EXPAT_DIR@/lib/expat.h>)
      #define P_EXPAT 1
    #endif

  #elif P_WINEXPAT==2 && !defined(_WIN32_WCE)

    #undef P_EXPAT_LIBRARY_V1
    #undef P_EXPAT_LIBRARY_V2

    #ifdef P_EXPAT_LIBRARY_V1
      #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_V1
    #elif defined (P_EXPAT_LIBRARY_V2)
      #define P_EXPAT_LIBRARY P_EXPAT_LIBRARY_V2
    #endif

    #ifdef P_EXPAT_LIBRARY
      #pragma include_alias(<expat.h>, <@EXPAT_DIR@/source/lib/expat.h>)
      #define P_EXPAT 1
    #endif

  #endif

#endif

#ifdef P_EXPAT
  #undef P_VXML
  #undef P_JABBER
  #undef P_XMLRPC
  #undef P_SOAP
#endif


/////////////////////////////////////////////////
//
// OpenLDAP
//

#ifndef _WIN32_WCE
  #undef P_LDAP 
#endif

#if defined(_MSC_VER) && P_LDAP

  #pragma include_alias(<ldap.h>,          <@LDAP_DIR@/include/ldap.h>)
  #pragma include_alias(<lber.h>,          <@LDAP_DIR@/include/lber.h>)
  #pragma include_alias(<lber_types.h>,    <@LDAP_DIR@/include/lber_types.h>)
  #pragma include_alias(<ldap_features.h>, <@LDAP_DIR@/include/ldap_features.h>)
  #pragma include_alias(<ldap_cdefs.h>,    <@LDAP_DIR@/include/ldap_cdefs.h>)

  #ifdef _DEBUG
    #define P_LDAP_LIBRARY "@LDAP_DIR@/DLLDebug/openldapd.lib"
  #else
    #define P_LDAP_LIBRARY "@LDAP_DIR@/DLLRelease/openldap.lib"
  #endif

#endif

#undef P_MEDIALIB


/////////////////////////////////////////////////
//
// DNS resolver
//

#ifndef _WIN32_WCE
  #undef P_DNS 
  #undef P_HAS_RES_NINIT
#endif

#if defined(_MSC_VER) && P_DNS

  #pragma include_alias(<windns.h>, <@DNS_DIR@/Include/windns.h>)

  #define P_DNS_LIBRARY "@DNS_DIR@/Lib/DnsAPI.Lib"

#endif



/////////////////////////////////////////////////
//
// SAPI speech API (Windows only)
// Disabled SAPI because Vista insists in linking with the non-debug version of the code
// It will need to stay disabled until someone adds a compile-time test for Vista
//

#ifndef _WIN32_WCE
// #undef P_SAPI
#endif

#if defined(_MSC_VER) && P_SAPI

  #pragma include_alias(<sphelper.h>, <@SAPI_DIR@/include/sphelper.h>)
  #pragma include_alias(<sapi.h>, <@SAPI_DIR@/include/sapi.h>)
  #pragma include_alias(<sapiddk.h>, <@SAPI_DIR@/include/sapiddk.h>)
  #pragma include_alias(<SPError.h>, <@SAPI_DIR@/include/SPError.h>)
  #pragma include_alias(<SPDebug.h>, <@SAPI_DIR@/include/SPDebug.h>)

  #undef P_SAPI_LIBRARY

#endif



/////////////////////////////////////////////////
//
// Cyrus SASL
//

#ifndef _WIN32_WCE
  #undef P_SASL 
  #undef P_SASL2
  #undef P_HAS_SASL_SASL_H 
#endif

#if defined(_MSC_VER) && (defined(P_SASL) || defined(P_SASL2))

  #pragma include_alias(<sasl/sasl.h>, <@SASL_DIR@/include/sasl.h>)

  #define P_SASL_LIBRARY "@SASL_DIR@/lib/libsasl.lib"
  #define P_HAS_SASL_SASL_H 1

#endif



/////////////////////////////////////////////////
//
// SDL toolkit
//

#if P_VIDEO
  #ifndef _WIN32_WCE
    #undef P_SDL
  #endif
#endif

#if defined(_MSC_VER) && P_SDL
  #pragma include_alias(<SDL/SDL.h>, <@SDL_DIR@/include/SDL.h>)

  #undef P_SDL_LIBRARY

  #ifndef P_SDL_LIBRARY
    #ifdef _DEBUG
      #define P_SDL_LIBRARY "@SDL_DIR@/VisualC/SDL/Debug/SDL.lib"
    #else
      #define P_SDL_LIBRARY "@SDL_DIR@/VisualC/SDL/Release/SDL.lib"
    #endif
  #endif

#endif

/////////////////////////////////////////////////
//
// APP Share Input 
//

#if P_VIDEO
  #ifndef _WIN32_WCE
    #undef P_APPSHARE
  #endif
#endif

#if defined(_MSC_VER) && P_APPSHARE
  #pragma include_alias(<ptlib/vidinput_app.h>, <ptlib/msos/ptlib/vidinput_app.h>)
#endif

/////////////////////////////////////////////////
//
// DirectX Support (Windows only)
//

#if defined(_MSC_VER)

  #ifdef _WIN32_WCE

    #if P_VIDEO
      //#define P_DIRECTSOUND 1
      #define P_DIRECTSHOW 1
      #define P_DIRECTSHOW_LIBRARY1 "ddraw.lib"
      #define P_DIRECTSHOW_LIBRARY2 "strmiids.lib"
    #endif

    #undef P_VFW_CAPTURE
    
  #else // _WIN32_WCE

    #if P_AUDIO
      #undef P_DIRECTSOUND
      #undef P_DIRECTSOUND_WINCE
    #endif

    #if P_VIDEO
      #define P_VFW_CAPTURE 1

      #undef P_DIRECTX_DDRAW_H
      #undef P_DIRECTSHOW_DDRAW_H
    #endif

    #if defined(P_DIRECTX_DDRAW_H) || defined(P_DIRECTSHOW_DDRAW_H)
      #undef P_DIRECTSHOW
    #endif

    #if defined(P_DIRECTSOUND) && !defined(P_DIRECTSOUND_WINCE)

      #pragma include_alias(<dsound.h>, <@DIRECTX_DIR@/include/dsound.h>)

      #undef P_DIRECTSOUND_LIB64
      #undef P_DIRECTSOUND_LIB32

      #if defined(_WIN64)
        #define P_DIRECTSOUND_LIBRARY P_DIRECTSOUND_LIB64
      #else
        #define P_DIRECTSOUND_LIBRARY P_DIRECTSOUND_LIB32
      #endif

    #endif

    #if defined(P_DIRECTSHOW)

      #ifdef P_DIRECTSHOW_DDRAW_H
        #pragma include_alias(<ddraw.h>, <@DIRECTSHOW_DIR@/include/ddraw.h>)
      #else
        #pragma include_alias(<ddraw.h>, <@DIRECTX_DIR@/include/ddraw.h>)
      #endif

      #pragma include_alias(<dshow.h>, <@DIRECTSHOW_DIR@/include/dshow.h>)
      #pragma include_alias(<amvideo.h>, <@DIRECTSHOW_DIR@/include/amvideo.h>)
      #pragma include_alias(<evcode.h>, <@DIRECTSHOW_DIR@/include/evcode.h>)
      #pragma include_alias(<errors.h>, <@DIRECTSHOW_DIR@/include/errors.h>)
      #pragma include_alias(<edevdefs.h>, <@DIRECTSHOW_DIR@/include/edevdefs.h>)
      #pragma include_alias(<audevcod.h>, <@DIRECTSHOW_DIR@/include/audevcod.h>)
      #pragma include_alias(<dvdevcod.h>, <@DIRECTSHOW_DIR@/include/dvdevcod.h>)
      #pragma include_alias(<VFWMSGS.H>, <@DIRECTSHOW_DIR@/include/VFWMSGS.H>)

      #define P_DIRECTSHOW_LIBRARY1 "@DIRECTSHOW_DIR@/lib/strmiids.lib"
      #define P_DIRECTSHOW_LIBRARY2 "@DIRECTSHOW_DIR@/lib/quartz.lib"

    #endif // P_DIRECTSHOW

  #endif // _WIN32_WCE

#else /* defined(_MSC_VER)*/

  #undef P_DIRECTSHOW
  #undef P_VFW_CAPTURE

#endif /* defined(_MSC_VER)*/


/////////////////////////////////////////////////
//
// COM/DCOM Support (Windows only)
//

#if defined(_WIN32) || (_WIN32_WCE > 0x500)

  #if defined(_WIN32)
    #define _WIN32_DCOM 1
  #endif

  #if defined(_WIN32_WCE) && !defined(_CE_DCOM)
    #ifndef _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA
      #define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA  1
    #endif
  #endif

  #define P_WIN_COM
  #define _OLE_LIB "ole32.lib"

#endif 

/////////////////////////////////////////////////
//
// various functions
//
#undef USE_SYSTEM_SWAB

#undef  P_USE_STANDARD_CXX_BOOL
#if !defined(P_USE_STANDARD_CXX_BOOL)
#  define P_USE_INTEGER_BOOL
#endif


#endif // PTLIB_BUILDOPTS_H


// End Of File ///////////////////////////////////////////////////////////////

