[svn] * Added ACE for Linux and Windows (Thanks Derex for Linux part and partial Windows part)
* Updated to 6721 and 676 * Fixed TrinityScript logo * Version updated to 0.2.6721.676 --HG-- branch : trunk rename : 6700-670 => 6721-676
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
# ACE_CHECK_DEFINE(DEFINE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = 'default-includes'])
|
||||
#-----------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_DEFINE],[
|
||||
AS_VAR_PUSHDEF([ac_var],[ace_cv_defined_$1])dnl
|
||||
AC_CACHE_CHECK([for $1], ac_var,
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([$4])
|
||||
#ifdef $1
|
||||
int ok;
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
])],AS_VAR_SET(ac_var, yes),AS_VAR_SET(ac_var, no)))
|
||||
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
|
||||
AS_VAR_POPDEF([ac_var])dnl
|
||||
])
|
||||
|
||||
# ACE_CHECK_HAS_DEFINES(DEFINE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = 'default-includes'])
|
||||
#-----------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_HAS_DEFINES],
|
||||
[AC_FOREACH([ACE_Def], [$1],
|
||||
[AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Def),
|
||||
[Define to 1 if platform has ]ACE_Def[().])])dnl
|
||||
for ace_def in $1
|
||||
do
|
||||
ACE_CHECK_DEFINE($ace_def,
|
||||
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_def])]) $2],
|
||||
[$3],
|
||||
[$4])dnl
|
||||
done
|
||||
])
|
||||
|
||||
# ACE_CHECK_LACKS_DEFINES(DEFINE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# [INCLUDES = 'default-includes'])
|
||||
#-----------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_LACKS_DEFINES],
|
||||
[AC_FOREACH([ACE_Def], [$1],
|
||||
[AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Def),
|
||||
[Define to 1 if platform lacks ]ACE_Def[().])])dnl
|
||||
for ace_def in $1
|
||||
do
|
||||
ACE_CHECK_DEFINE($ace_def,
|
||||
[$2],
|
||||
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_def])]) $3],
|
||||
[$4])dnl
|
||||
done
|
||||
])
|
||||
@@ -0,0 +1,148 @@
|
||||
# ACE_FUNC_STRCASECMP
|
||||
# + Defines ACE_LACKS_STRCASECMP to 1 if platform lacks strcasecmp()
|
||||
# + Defines ACE_STRCASECMP_EQUIVALENT to identifier name if platform
|
||||
# has a equivalent function that differs in name only.
|
||||
# + Defines ACE_LACKS_STRCASECMP_PROTOTYPE to 1 if platform lacks
|
||||
# declaration for strcasecmp().
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_STRCASECMP],
|
||||
[ACE_CHECK_LACKS_FUNCS(strcasecmp)
|
||||
if test "$ac_cv_func_strcasecmp" = yes; then
|
||||
AC_CHECK_DECL([strcasecmp],
|
||||
[],
|
||||
[AC_DEFINE([ACE_LACKS_STRCASECMP_PROTOTYPE], 1,
|
||||
[Define to 1 if platform lacks a declaration for strcasecmp()])],
|
||||
[
|
||||
#if !defined(ACE_LACKS_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#if !defined(ACE_LACKS_STRING_H)
|
||||
#include <string.h>
|
||||
#endif
|
||||
])
|
||||
else
|
||||
AC_CHECK_FUNC(stricmp)
|
||||
if test "$ac_cv_func_stricmp" = yes; then
|
||||
AC_DEFINE(ACE_STRCASECMP_EQUIVALENT, [::stricmp],
|
||||
[Define to function that is equivalent to strcasecmp()])
|
||||
else
|
||||
AC_CHECK_FUNC(_stricmp)
|
||||
if test "$ac_cv_func__stricmp" = yes; then
|
||||
AC_DEFINE(ACE_STRCASECMP_EQUIVALENT, [::_stricmp])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# ACE_FUNC_STRNCASECMP
|
||||
# + Defines ACE_LACKS_STRCASECMP to 1 if platform lacks strcasecmp()
|
||||
# + Defines ACE_STRCASECMP_EQUIVALENT to identifier name if platform
|
||||
# has a equivalent function that differs in name only.
|
||||
# + Defines ACE_LACKS_STRNCASECMP_PROTOTYPE to 1 if platform lacks
|
||||
# declaration for strncasecmp().
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_STRNCASECMP],
|
||||
[ACE_CHECK_LACKS_FUNCS(strncasecmp)
|
||||
if test "$ac_cv_func_strncasecmp" = yes; then
|
||||
AC_CHECK_DECL([strncasecmp],
|
||||
[],
|
||||
[AC_DEFINE([ACE_LACKS_STRNCASECMP_PROTOTYPE], 1,
|
||||
[Define to 1 if platform lacks a declaration for strncasecmp()])],
|
||||
[
|
||||
#if !defined(ACE_LACKS_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#if !defined(ACE_LACKS_STRING_H)
|
||||
#include <string.h>
|
||||
#endif
|
||||
])
|
||||
else
|
||||
AC_CHECK_FUNC(strnicmp)
|
||||
if test "$ac_cv_func_strnicmp" = yes; then
|
||||
AC_DEFINE(ACE_STRNCASECMP_EQUIVALENT, [::strnicmp],
|
||||
[Define to function that is equivalent to strncasecmp()])
|
||||
else
|
||||
AC_CHECK_FUNC(_strnicmp)
|
||||
if test "$ac_cv_func__strnicmp" = yes; then
|
||||
AC_DEFINE(ACE_STRNCASECMP_EQUIVALENT, [::_strnicmp])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# ACE_FUNC_STRDUP
|
||||
# + Defines ACE_LACKS_STRDUP to 1 if platform lacks strdup()
|
||||
# + Defines ACE_STRDUP_EQUIVALENT to identifier name if platform
|
||||
# has a equivalent function that differs in name only.
|
||||
# + Defines ACE_HAS_NONCONST_STRDUP if argument is char*. (TODO)
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_STRDUP],
|
||||
[ACE_CHECK_LACKS_FUNCS(strdup)
|
||||
if test "$ac_cv_func_strdup" = no; then
|
||||
AC_CHECK_FUNC(_strdup)
|
||||
if test "$ac_cv_func__strdup" = yes; then
|
||||
AC_DEFINE(ACE_STRDUP_EQUIVALENT, [::_strdup],
|
||||
[Define to function that is equivalent to strdup()])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# ACE_FUNC_WCSCASECMP
|
||||
# + Defines ACE_LACKS_WCSCASECMP to 1 if platform lacks strcasecmp()
|
||||
# + Defines ACE_WCSCASECMP_EQUIVALENT to identifier name if platform
|
||||
# has a equivalent function that differs in name only.
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_WCSCASECMP],
|
||||
[ACE_CHECK_LACKS_FUNCS(wcscasecmp)
|
||||
if test "$ac_cv_func_wcscasecmp" = no; then
|
||||
AC_CHECK_FUNC(wcsicmp)
|
||||
if test "$ac_cv_func_wcsicmp" = yes; then
|
||||
AC_DEFINE(ACE_WCSCASECMP_EQUIVALENT, [::wcsicmp],
|
||||
[Define to function that is equivalent to wcscasecmp()])
|
||||
else
|
||||
AC_CHECK_FUNC(_wcsicmp)
|
||||
if test "$ac_cv_func__wcsicmp" = yes; then
|
||||
AC_DEFINE(ACE_WCSCASECMP_EQUIVALENT, [::_wcsicmp])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# ACE_FUNC_WCSNCASECMP
|
||||
# + Defines ACE_LACKS_WCSNCASECMP to 1 if platform lacks strcasecmp()
|
||||
# + Defines ACE_WCSNCASECMP_EQUIVALENT to identifier name if platform
|
||||
# has a equivalent function that differs in name only.
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_WCSNCASECMP],
|
||||
[ACE_CHECK_LACKS_FUNCS(wcsncasecmp)
|
||||
if test "$ac_cv_func_wcsncasecmp" = no; then
|
||||
AC_CHECK_FUNC(wcsnicmp)
|
||||
if test "$ac_cv_func_wcsnicmp" = yes; then
|
||||
AC_DEFINE(ACE_WCSNCASECMP_EQUIVALENT, [::wcsnicmp],
|
||||
[Define to function that is equivalent to wcsncasecmp()])
|
||||
else
|
||||
AC_CHECK_FUNC(_wcsnicmp)
|
||||
if test "$ac_cv_func__wcsnicmp" = yes; then
|
||||
AC_DEFINE(ACE_WCSNCASECMP_EQUIVALENT, [::_wcsnicmp])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# ACE_FUNC_WCSDUP
|
||||
# + Defines ACE_LACKS_WCSDUP to 1 if platform lacks wcsdup()
|
||||
# + Defines ACE_WCSDUP_EQUIVALENT to identifier name if platform
|
||||
# has a equivalent function that differs in name only.
|
||||
# + Defines ACE_HAS_NONCONST_WCSDUP if argument is char*. (TODO)
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_WCSDUP],
|
||||
[ACE_CHECK_LACKS_FUNCS(wcsdup)
|
||||
if test "$ac_cv_func_wcsdup" = no; then
|
||||
AC_CHECK_FUNC(_wcsdup)
|
||||
if test "$ac_cv_func__wcsdup" = yes; then
|
||||
AC_DEFINE(ACE_WCSDUP_EQUIVALENT, [::_wcsdup],
|
||||
[Define to function that is equivalent to wcsdup()])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@@ -0,0 +1,27 @@
|
||||
# ACE_CHECK_HAS_FUNCS(FUNCTION..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_HAS_FUNCS],
|
||||
[AC_FOREACH([ACE_Func], [$1],
|
||||
[AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Func),
|
||||
[Define to 1 if platform has ]ACE_Func[().])])dnl
|
||||
for ace_func in $1
|
||||
do
|
||||
AC_CHECK_FUNC($ace_func,
|
||||
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_func])]) $2],
|
||||
[$3])dnl
|
||||
done
|
||||
])
|
||||
|
||||
# ACE_CHECK_LACKS_FUNCS(FUNCTION..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#-----------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_LACKS_FUNCS],
|
||||
[AC_FOREACH([ACE_Func], [$1],
|
||||
[AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Func),
|
||||
[Define to 1 if platform lacks ]ACE_Func[().])])dnl
|
||||
for ace_func in $1
|
||||
do
|
||||
AC_CHECK_FUNC($ace_func,
|
||||
[$2],
|
||||
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_func])]) $3])dnl
|
||||
done
|
||||
])
|
||||
@@ -0,0 +1,35 @@
|
||||
# ACE_CHECK_HAS_HEADERS(HEADER-FILE...,
|
||||
# [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = 'default-includes'])
|
||||
#-----------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_HAS_HEADERS],
|
||||
[AC_FOREACH([ACE_Header], [$1],
|
||||
[AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Header),
|
||||
[Define to 1 if platform has the <]ACE_Header[> header file.])])dnl
|
||||
for ace_header in $1
|
||||
do
|
||||
AC_CHECK_HEADER($ace_header,
|
||||
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_header])]) $2],
|
||||
[$3],
|
||||
[$4])dnl
|
||||
done
|
||||
])
|
||||
|
||||
# ACE_CHECK_LACKS_HEADERS(HEADER-FILE...,
|
||||
# [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = 'default-includes'])
|
||||
#-----------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_LACKS_HEADERS],
|
||||
[AC_FOREACH([ACE_Header], [$1],
|
||||
[AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Header),
|
||||
[Define to 1 if platform lacks the <]ACE_Header[> header file.])])dnl
|
||||
for ace_header in $1
|
||||
do
|
||||
AC_CHECK_HEADER($ace_header,
|
||||
[$2],
|
||||
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_header])]) $3],
|
||||
[$4])dnl
|
||||
done
|
||||
])
|
||||
@@ -0,0 +1,602 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: acinclude.m4 80826 2008-03-04 14:51:23Z wotte $
|
||||
dnl
|
||||
dnl ACE M4 include file which contains general M4 macros
|
||||
dnl to be used by the ACE configure script.
|
||||
dnl
|
||||
dnl The macros in this file were designed for ACE but should be
|
||||
dnl general enough for general use.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 1998, 1999, 2000, 2002 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
dnl miscellaneous macros
|
||||
|
||||
dnl Prevent the configure script continuing any further if a CVS control
|
||||
dnl directory is found. The idea is to prevent files generated during
|
||||
dnl configuration and build from be checked in to the CVS repository that
|
||||
dnl the sources are checked into. This should only be an issue for
|
||||
dnl maintainers, not end-users. Maintainers should configure and build in
|
||||
dnl a directory that doesn't contain any CVS controlled sources and files,
|
||||
dnl i.e. that doesn't contain a CVS directory.
|
||||
dnl
|
||||
dnl Usage: ACE_CHECK_FOR_CVS_DIR
|
||||
AC_DEFUN([ACE_CHECK_FOR_CVS_DIR],
|
||||
[
|
||||
if test -d CVS; then
|
||||
AC_MSG_ERROR(
|
||||
[
|
||||
This error is meant for maintainers:
|
||||
|
||||
Please configure and build in a non-CVS controlled directory.
|
||||
Doing so will prevent accidentally committing automatically
|
||||
generated files into the CVS repository and help ensure that
|
||||
the generated files and build scheme are correct.
|
||||
|
||||
For example, try the following from the top-level source
|
||||
directory:
|
||||
|
||||
mkdir objdir
|
||||
cd objdir
|
||||
../configure
|
||||
make
|
||||
|
||||
This will create a build space in the directory `objdir' and
|
||||
start a build in that directory.
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl Prevent the configure script from continuing any further if
|
||||
dnl configuration is being performed in the top-level directory. The
|
||||
dnl idea is to prevent files generated during configuration and build
|
||||
dnl from overwriting the stock files of the same name.
|
||||
dnl Usage: ACE_CHECK_TOP_SRCDIR
|
||||
AC_DEFUN([ACE_CHECK_TOP_SRCDIR],
|
||||
[
|
||||
if test "$srcdir" = "." && test "$USE_MAINTAINER_MODE" != "yes"; then
|
||||
AC_MSG_ERROR(
|
||||
[
|
||||
Please configure and build in a directory other than the
|
||||
top-level source directory. Doing so will prevent files
|
||||
distributed with the package from being overwritten. This is
|
||||
currently necessary since autoconf support is still
|
||||
experimental. If you encounter problems please use the stock
|
||||
build procedure.
|
||||
|
||||
For example, try the following from the top-level source
|
||||
directory:
|
||||
|
||||
mkdir objdir
|
||||
cd objdir
|
||||
../configure
|
||||
make
|
||||
|
||||
This will create a build space in the directory `objdir' and
|
||||
start a build in that directory.
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Add compiler flags to the CXXFLAGS and CFLAGS variables when doing an
|
||||
dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) (not ACE_TRY_COMPILE).
|
||||
dnl Use this macro when adding include directories to the compiler flags,
|
||||
dnl for example.
|
||||
dnl Usage: ACE_TRY_COMPILE(COMPILER-FLAGS, INCLUDES, FUNCTION-BODY,
|
||||
dnl [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
|
||||
AC_DEFUN([ACE_TRY_COMPILE],
|
||||
[
|
||||
AC_LANG([C++])
|
||||
AC_REQUIRE([AC_LANG])
|
||||
|
||||
ace_pre_try_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $1"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],[$4],[$5])
|
||||
|
||||
dnl Restore the C++ flags
|
||||
CXXFLAGS="$ace_pre_try_CXXFLAGS"
|
||||
|
||||
])
|
||||
|
||||
dnl Create a temporary empty file and remove it after commands are done using
|
||||
dnl it. The directory in which the temporary file will be created in must
|
||||
dnl exist. Files will be created under the source directory, not the build
|
||||
dnl directory.
|
||||
dnl Use this macro when you need a particular file available but want it to be
|
||||
dnl empty. This is useful to prevent conflicts with autoconf's confdefs.h
|
||||
dnl header when doing an AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]).
|
||||
dnl Usage: ACE_USE_TEMP_FILE(TEMP-FILE-TO-CREATE, COMMANDS-THAT-WILL-USE-IT)
|
||||
AC_DEFUN([ACE_USE_TEMP_FILE],
|
||||
[
|
||||
test -d $1 && AC_MSG_ERROR([cannot create file: $acetmp is a directory])
|
||||
|
||||
dnl Make sure contents of existing file don't override the contents
|
||||
dnl of the temporary one.
|
||||
test -f ${srcdir}/$1 && mv ${srcdir}/$1 ${srcdir}/$1.conf
|
||||
|
||||
if test ${srcdir} != "."; then
|
||||
dnl Create all of the sub-directories.
|
||||
AS_MKDIR_P([`AS_DIRNAME(["$1"])`])
|
||||
fi
|
||||
|
||||
touch $1
|
||||
|
||||
$2
|
||||
|
||||
if test -f ${srcdir}/$1.conf; then
|
||||
mv ${srcdir}/$1.conf ${srcdir}/$1
|
||||
fi
|
||||
|
||||
if test ${srcdir} != "."; then
|
||||
dnl Remove the file. Any sub-directories will not be removed
|
||||
dnl since we have no way to tell if they existed prior to the
|
||||
dnl creation of this file.
|
||||
rm $1
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Run given test(s) with warnings converted to errors
|
||||
dnl Usage: ACE_CONVERT_WARNINGS_TO_ERRORS(TEST-BLOCK)
|
||||
AC_DEFUN([ACE_CONVERT_WARNINGS_TO_ERRORS],
|
||||
[
|
||||
dnl $WERROR is set in the ACE_SET_COMPILER_FLAGS macro.
|
||||
AC_REQUIRE([ACE_SET_COMPILER_FLAGS])
|
||||
|
||||
dnl Some tests may pass because the compiler issues warnings
|
||||
dnl instead of errors when errors should occur. This macro converts
|
||||
dnl warnings to errors when executing the action/test passed to this
|
||||
dnl macro so that action/test fails when it is supposed to fail; at
|
||||
dnl least that is the idea.
|
||||
|
||||
ace_pre_warning_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $WERROR"
|
||||
|
||||
$1
|
||||
|
||||
CXXFLAGS="$ace_pre_warning_CXXFLAGS"
|
||||
])
|
||||
|
||||
dnl Wrapper around AC_CACHE_VAL used to ensure "ACTION-IF" commands are run
|
||||
dnl even if results have been previously cached.
|
||||
dnl Usage: ACE_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS-TO-SET-CACHE-VAL,
|
||||
dnl ACTION-IF-CACHE-ID-IS-YES,
|
||||
dnl ACTION-IF-CACHE-ID-IS-NO)
|
||||
dnl The COMMANDS-TO-SET-CACHE-VAL should set the CACHE-ID to yes or "no,"
|
||||
dnl otherwise the "ACTION-IF*" commands may not run. The
|
||||
dnl COMMANDS-TO-SET-CACHE-VAL should only set the CACHE value. For example,
|
||||
dnl no AC_DEFINES should be placed in the COMMANDS-TO-SET-CACHE-VAL.
|
||||
AC_DEFUN([ACE_CACHE_CHECK],
|
||||
[
|
||||
AC_MSG_CHECKING([$1])
|
||||
AC_CACHE_VAL([$2], [$3])
|
||||
AC_MSG_RESULT([[$]$2])
|
||||
if test "[$]$2" != no; then
|
||||
ace_just_a_place_holder=fixme
|
||||
ifelse([$4], , :, [$4])
|
||||
else
|
||||
ace_just_a_place_holder=fixme
|
||||
ifelse([$5], , , [$5
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl checks for programs
|
||||
|
||||
dnl checks for libraries
|
||||
|
||||
dnl checks for header files
|
||||
|
||||
dnl checks for typedefs
|
||||
|
||||
dnl Check for specific typedef in given header file
|
||||
dnl Usage: ACE_CHECK_TYPE(TYPEDEF, INCLUDE,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl This macro can only check for one typedef in one header file at a time!!
|
||||
AC_DEFUN([ACE_CHECK_TYPE],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CXX])
|
||||
dnl AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
dnl AC_LANG([C++])
|
||||
dnl AC_REQUIRE([AC_LANG])
|
||||
|
||||
ACE_CACHE_CHECK([for $1 in $2], [ace_cv_type_$1],
|
||||
[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <$2>
|
||||
]], [[
|
||||
$1 ace_$1;
|
||||
]])],[
|
||||
ace_cv_type_$1=yes
|
||||
],[
|
||||
ace_cv_type_$1=no
|
||||
])
|
||||
],[$3],[$4])
|
||||
])
|
||||
|
||||
|
||||
dnl checks for structures
|
||||
|
||||
dnl Check for specific struct in given header file
|
||||
dnl Usage: ACE_CHECK_STRUCT(STRUCTURE, INCLUDE,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl This macro can only check for one struct in one header file at a time!!
|
||||
AC_DEFUN([ACE_CHECK_STRUCT],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CXX])
|
||||
dnl AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
dnl AC_LANG([C++])
|
||||
dnl AC_REQUIRE([AC_LANG])
|
||||
|
||||
dnl Do the transliteration at runtime so arg 1 can be a shell variable.
|
||||
dnl ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
|
||||
|
||||
ACE_CACHE_CHECK([for struct $1 in $2], [ace_cv_struct_$1],
|
||||
[
|
||||
ACE_TRY_COMPILE_STRUCT([$1], [$2],
|
||||
[
|
||||
ace_cv_struct_$1=yes
|
||||
],
|
||||
[
|
||||
ace_cv_struct_$1=no
|
||||
])
|
||||
], $3, $4)
|
||||
])
|
||||
|
||||
dnl Check for specific struct in given header file by compiling a test
|
||||
dnl program. This macro is used by ACE_CHECK_STRUCT.
|
||||
dnl Usage: ACE_TRY_COMPILE_STRUCT(STRUCTURE, INCLUDE,
|
||||
dnl [ACTION-IF-SUCCESSFUL[, ACTION-IF-NOT-SUCCESSFUL]])
|
||||
dnl This macro can only check for one struct in one header file at a time!!
|
||||
AC_DEFUN([ACE_TRY_COMPILE_STRUCT],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CXX])
|
||||
dnl AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
dnl AC_LANG([C++])
|
||||
dnl AC_REQUIRE([AC_LANG])
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <$2>
|
||||
]], [[
|
||||
struct $1 ace_$1;
|
||||
]])],[
|
||||
$3
|
||||
],[
|
||||
dnl Some compilers don't like the "struct" but we need the struct for
|
||||
dnl some platforms to resolve ambiguities between functions and
|
||||
dnl structures with with the same name. So, we try the same test but
|
||||
dnl without "struct" if the above test with "struct" fails. If both
|
||||
dnl tests fail, then we can be reasonably sure that we don't have the
|
||||
dnl structure we are testing for.
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <$2>
|
||||
]],
|
||||
[[
|
||||
$1 ace_$1;
|
||||
]])],
|
||||
[
|
||||
$3
|
||||
],
|
||||
[
|
||||
$4
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl checks for variables
|
||||
|
||||
dnl checks for compiler characteristics
|
||||
|
||||
dnl checks for library functions
|
||||
|
||||
dnl Check for function using prototype in header
|
||||
dnl This macro is used if a function is called a different name in a given
|
||||
dnl library than what is in the header file but the difference is made
|
||||
dnl transparent to the user since the header may provide a macro to make
|
||||
dnl things "transparent." If the given header does not exist then this
|
||||
dnl macro acts just like the standard AC_CHECK_FUNC macro.
|
||||
dnl Usage: ACE_CHECK_FUNC(FUNCTION, HEADER,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
AC_DEFUN([ACE_CHECK_FUNC],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CXX])
|
||||
dnl AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
dnl AC_LANG([C++])
|
||||
dnl AC_REQUIRE([AC_LANG])
|
||||
AC_REQUIRE([AC_PROG_AWK])
|
||||
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <$2>
|
||||
]])],[ace_header_exists=yes],[ace_header_exists=no])
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
|
||||
#include <$2>
|
||||
ACE_REAL_FUNCTION $1
|
||||
|
||||
EOF
|
||||
|
||||
if test "$ace_header_exists" = yes; then
|
||||
if test -z "$AWK"; then
|
||||
AC_MSG_WARN([No awk program found. Real $1 function may not be found.])
|
||||
fi
|
||||
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "ACE_REAL_FUNCTION" |
|
||||
(eval "$AWK '{print \[$]2}' > conftest.awk 2>&1"); then
|
||||
rm -f conftest.$ac_ext
|
||||
ace_real_function=`cat conftest.awk`
|
||||
rm -f conftest.awk
|
||||
fi
|
||||
|
||||
if test $1 != "$ace_real_function"; then
|
||||
AC_MSG_CHECKING([for real $1 from $2])
|
||||
AC_MSG_RESULT([$ace_real_function])
|
||||
fi
|
||||
else
|
||||
ace_real_function=$1
|
||||
fi dnl test "$ace_header_not_exist" != yes
|
||||
|
||||
AC_CHECK_FUNC([$ace_real_function],[$3],[$4])
|
||||
])
|
||||
|
||||
dnl Check for function in library using prototype in header
|
||||
dnl This macro is used if a function is called a different name in a given
|
||||
dnl library than what is in the header file but the difference is made
|
||||
dnl transparent to the user since the header may provide a macro to make
|
||||
dnl things "transparent." If the given header does not exist then this
|
||||
dnl macro acts just like the standard AC_CHECK_LIB macro.
|
||||
dnl Usage: ACE_CHECK_LIB(LIBRARY, FUNCTION, HEADER,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
AC_DEFUN([ACE_CHECK_LIB],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CXX])
|
||||
dnl AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
dnl AC_LANG([C++])
|
||||
dnl AC_REQUIRE([AC_LANG])
|
||||
AC_REQUIRE([AC_PROG_AWK])
|
||||
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <$3>
|
||||
]])],[ace_header_exists=yes],[ace_header_exists=no])
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
|
||||
#include <$3>
|
||||
ACE_REAL_FUNCTION $2
|
||||
|
||||
EOF
|
||||
|
||||
if test "$ace_header_exists" = yes; then
|
||||
if test -z "$AWK"; then
|
||||
AC_MSG_WARN([No awk program found. "Real" function in library may not be found.])
|
||||
fi
|
||||
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "ACE_REAL_FUNCTION" |
|
||||
eval "$AWK '{print \[$]2}'" > conftest.awk 2>&1; then
|
||||
rm -f conftest.$ac_ext
|
||||
ace_real_function=`cat conftest.awk`
|
||||
rm -f conftest.awk
|
||||
fi
|
||||
|
||||
if test $2 != "$ace_real_function"; then
|
||||
AC_MSG_CHECKING([for real $2 from $3])
|
||||
AC_MSG_RESULT([$ace_real_function])
|
||||
fi
|
||||
else
|
||||
ace_real_function=$2
|
||||
fi dnl test "$ace_header_not_exist" != yes
|
||||
|
||||
AC_CHECK_LIB([$1], [$ace_real_function], [$4], [$5])
|
||||
])
|
||||
|
||||
|
||||
dnl Check if getrlimit() takes an enum as 1st argument
|
||||
dnl Usage: ACE_CHECK_SETRLIMIT_ENUM
|
||||
AC_DEFUN([ACE_CHECK_SETRLIMIT_ENUM],
|
||||
[
|
||||
if test "$ac_cv_func_setrlimit" = yes; then
|
||||
AC_MSG_CHECKING([if setrlimit() takes an enum as 1st argument])
|
||||
AC_EGREP_HEADER([setrlimit.*\(.*[^,]*enum], sys/resource.h,
|
||||
[
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#include "confdefs.h"
|
||||
#include <sys/resource.h>
|
||||
EOF
|
||||
|
||||
dnl Here we attempt to determine the type of the first argument of
|
||||
dnl getrusage from its prototype. It should either be an int or an
|
||||
dnl enum. If it is an enum, determine the enum type.
|
||||
ace_setrlimit_enum=`eval "$ac_cpp conftest.$ac_ext" | \
|
||||
$EGREP '[[ ]]+setrlimit.*\(.*[[^,]]*enum' | \
|
||||
sed -e 's/^.*setrlimit.*(.*enum//' -e 's/[[^ ]]*,.*$//'`
|
||||
|
||||
ace_setrlimit_enum="enum $ace_setrlimit_enum"
|
||||
|
||||
AC_MSG_RESULT([$ace_setrlimit_enum])
|
||||
|
||||
if test -n "$ace_setrlimit_enum"; then
|
||||
AC_DEFINE_UNQUOTED([ACE_HAS_RLIMIT_RESOURCE_ENUM], [$ace_setrlimit_enum])
|
||||
fi
|
||||
|
||||
rm -rf conftest*
|
||||
|
||||
dnl Do not remove this parenthesis --> )
|
||||
dnl It's only purpose to keep Emacs from getting confused about mismatched
|
||||
dnl parentheses.
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
fi dnl test "$ac_cv_func_setrlimit" = yes
|
||||
])
|
||||
|
||||
dnl Check if getrusage() takes an enum as 1st argument
|
||||
dnl Usage: ACE_CHECK_GETRUSAGE_ENUM
|
||||
AC_DEFUN([ACE_CHECK_GETRUSAGE_ENUM],
|
||||
[
|
||||
if test "$ac_cv_func_getrusage" = yes; then
|
||||
AC_MSG_CHECKING([if getrusage() takes an enum as 1st argument])
|
||||
AC_EGREP_HEADER([getrusage.*\(.*[^,]*enum], [sys/resource.h],
|
||||
[
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#include "confdefs.h"
|
||||
#include <sys/resource.h>
|
||||
EOF
|
||||
|
||||
dnl Here we attempt to determine the type of the first argument of
|
||||
dnl getrusage from its prototype. It should either be an int or an
|
||||
dnl enum. If it is an enum, determine the enum type.
|
||||
ace_rusage_who=`eval "$ac_cpp conftest.$ac_ext" | \
|
||||
$EGREP '[[ ]]+getrusage.*\(.*[[^,]]*enum' | \
|
||||
sed -e 's/^.*getrusage.*(.*enum//' -e 's/[[^ ]]*,.*$//'`
|
||||
|
||||
ace_rusage_who="enum $ace_rusage_who"
|
||||
|
||||
AC_MSG_RESULT([$ace_rusage_who])
|
||||
|
||||
if test -n "$ace_rusage_who"; then
|
||||
AC_DEFINE_UNQUOTED([ACE_HAS_RUSAGE_WHO_ENUM], [$ace_rusage_who])
|
||||
fi
|
||||
|
||||
rm -rf conftest*
|
||||
|
||||
dnl Do not remove this parenthesis --> )
|
||||
dnl It's only purpose to keep Emacs from getting confused about mismatched
|
||||
dnl parentheses.
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
fi dnl test "$ac_cv_func_getrusage" = yes
|
||||
])
|
||||
|
||||
|
||||
dnl Check for 64 bit llseek() or lseek64()
|
||||
dnl Usage: ACE_CHECK_LSEEK64
|
||||
AC_DEFUN([ACE_CHECK_LSEEK64],
|
||||
[
|
||||
AC_CHECK_FUNC([lseek64],
|
||||
[
|
||||
AC_DEFINE([ACE_HAS_LSEEK64])
|
||||
|
||||
dnl Check for 64 bit offset type in the lseek64() prototype, if it
|
||||
dnl exists.
|
||||
dnl ACE_CHECK_OFF64_T([lseek64])
|
||||
|
||||
dnl Check if _LARGEFILE64_SOURCE macro is needed to make the
|
||||
dnl lseek64() prototype visible, or if the prototype itself is missing.
|
||||
ACE_CACHE_CHECK([for lseek64 prototype],
|
||||
[ace_cv_lib_has_lseek64_prototype],
|
||||
[
|
||||
ace_save_CPPFLAGS="$CPPFLAGS"
|
||||
ace_no_largefile64="-U_LARGEFILE64_SOURCE"
|
||||
CPPFLAGS="$CPPFLAGS $ace_no_largefile64"
|
||||
AC_EGREP_HEADER([[^_]+lseek64], [unistd.h],
|
||||
[
|
||||
ace_cv_lib_has_lseek64_prototype=yes
|
||||
],
|
||||
[
|
||||
ace_cv_lib_has_lseek64_prototype=no
|
||||
])
|
||||
dnl Reset the compiler flags
|
||||
CPPFLAGS="$ace_save_CPPFLAGS"
|
||||
],[],[AC_DEFINE([ACE_LACKS_LSEEK64_PROTOTYPE])])
|
||||
],
|
||||
[
|
||||
AC_CHECK_FUNC([llseek],
|
||||
[
|
||||
AC_DEFINE([ACE_HAS_LLSEEK])
|
||||
dnl Check if _LARGEFILE64_SOURCE macro is needed to make the
|
||||
dnl llseek() prototype visible, or if the prototype itself is
|
||||
dnl missing.
|
||||
|
||||
dnl Check for 64 bit offset type in the llseek() prototype, if
|
||||
dnl it exists.
|
||||
dnl ACE_CHECK_OFF64_T([llseek])
|
||||
|
||||
ACE_CACHE_CHECK([for llseek prototype],
|
||||
[ace_cv_lib_has_llseek_prototype],
|
||||
[
|
||||
ace_save_CPPFLAGS="$CPPFLAGS"
|
||||
ace_no_largefile64="-U_LARGEFILE64_SOURCE"
|
||||
CPPFLAGS="$CPPFLAGS $ace_no_largefile64"
|
||||
AC_EGREP_HEADER([[^_]+llseek],[unistd.h],
|
||||
[
|
||||
ace_cv_lib_has_llseek_prototype=no
|
||||
],
|
||||
[
|
||||
ace_cv_lib_has_llseek_prototype=yes
|
||||
],)
|
||||
dnl Reset the compiler flags
|
||||
CPPFLAGS="$ace_save_CPPFLAGS"
|
||||
],[],[AC_DEFINE([ACE_LACKS_LLSEEK_PROTOTYPE])])
|
||||
|
||||
|
||||
],)
|
||||
])
|
||||
])
|
||||
|
||||
dnl Check what the 64 bit offset type is by checking what the offset
|
||||
dnl argument for llseek()/lseek64() is.
|
||||
dnl Usage: ACE_CHECK_LOFF_64(LSEEK64-FUNC)
|
||||
AC_DEFUN([ACE_CHECK_OFF64_T],
|
||||
[
|
||||
AC_MSG_CHECKING([for 64 bit offset type])
|
||||
AC_EGREP_HEADER([[ ]+$1.*\(.*],[unistd.h],
|
||||
[
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#include "confdefs.h"
|
||||
|
||||
/* Make sure 64 bit file feature test macro is defined. */
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef ACE_LACKS_UNISTD_H
|
||||
# include <unistd.h> /* needed for lseek64()/llseek() prototype */
|
||||
#endif
|
||||
EOF
|
||||
|
||||
dnl Here we attempt to determine the type of the second argument of
|
||||
dnl lseek64()/llseek() from its prototype.
|
||||
ace_off64_t=`eval "$ac_cpp conftest.$ac_ext" | \
|
||||
$EGREP '[[ ]]+lseek64.*\(.*' | \
|
||||
sed -e 's/^.*(.*,[[ ]]*\(.*\) .*,.*$/\1/'`
|
||||
|
||||
|
||||
if test -n "$ace_off64_t"; then
|
||||
AC_MSG_RESULT([$ace_off64_t])
|
||||
AC_DEFINE_UNQUOTED([ACE_LOFF_T_TYPEDEF], [$ace_off64_t])
|
||||
fi
|
||||
|
||||
rm -rf conftest*
|
||||
|
||||
dnl Do not remove this parenthesis --> )
|
||||
dnl It's only purpose is to keep Emacs from getting confused about
|
||||
dnl mismatched parentheses.
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
dnl checks for structures
|
||||
|
||||
dnl checks for system services
|
||||
@@ -0,0 +1,633 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: aio.m4 80826 2008-03-04 14:51:23Z wotte $
|
||||
dnl
|
||||
dnl aio.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains ACE specific M4 macros
|
||||
dnl that determine availablility of POSIX asynchronous IO
|
||||
dnl support.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 1998, 1999, 2002 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
dnl Asynchronous IO check
|
||||
dnl Use this macro to determine if asynchronous IO is working on a
|
||||
dnl given platform.
|
||||
dnl Usage: ACE_CHECK_ASYNCH_IO
|
||||
AC_DEFUN([ACE_CHECK_ASYNCH_IO],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_LANG([C++])
|
||||
AC_REQUIRE([AC_LANG])
|
||||
AC_REQUIRE([ACE_CHECK_THREADS])
|
||||
|
||||
dnl In case a library with the asynchronous libraries is found but
|
||||
dnl the asynchronous IO support is not functional then save a copy
|
||||
dnl of the list of libraries before the asynch IO function library
|
||||
dnl is added to the list so that we can revert the list to its
|
||||
dnl pre-asynch-IO check state.
|
||||
ace_save_LIBS="$LIBS"
|
||||
|
||||
dnl Asynchronous IO library check
|
||||
dnl Some platforms, such as Solaris puts aio_read in -lposix4, for example.
|
||||
dnl In some cases, the thread library must be linked to in addition to the
|
||||
dnl real-time support library. As such, make sure these checks are done
|
||||
dnl after the thread library checks.
|
||||
AC_SEARCH_LIBS([aio_read], [aio rt posix4],
|
||||
[ace_has_aio_funcs=yes], [ace_has_aio_funcs=no])
|
||||
|
||||
if test "$ace_has_aio_funcs" = yes; then
|
||||
ACE_CACHE_CHECK([for working asynchronous IO],
|
||||
[ace_cv_feature_aio_calls],
|
||||
[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#ifndef ACE_LACKS_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifndef ACE_LACKS_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream.h>
|
||||
|
||||
#include <aio.h>
|
||||
|
||||
class Test_Aio
|
||||
{
|
||||
public:
|
||||
Test_Aio (void);
|
||||
// Default constructor.
|
||||
|
||||
int init (void);
|
||||
// Initting the output file and the buffer.
|
||||
|
||||
int do_aio (void);
|
||||
// Doing the testing stuff.
|
||||
|
||||
~Test_Aio (void);
|
||||
// Destructor.
|
||||
private:
|
||||
int out_fd_;
|
||||
// Output file descriptor.
|
||||
|
||||
struct aiocb *aiocb_write_;
|
||||
// For writing to the file.
|
||||
|
||||
struct aiocb *aiocb_read_;
|
||||
// Reading stuff from the file.
|
||||
|
||||
char *buffer_write_;
|
||||
// The buffer to be written to the out_fd.
|
||||
|
||||
char *buffer_read_;
|
||||
// The buffer to be read back from the file.
|
||||
};
|
||||
|
||||
Test_Aio::Test_Aio (void)
|
||||
: out_fd_ (0),
|
||||
aiocb_write_ (new struct aiocb),
|
||||
aiocb_read_ (new struct aiocb),
|
||||
buffer_write_ (0),
|
||||
buffer_read_ (0)
|
||||
{
|
||||
}
|
||||
|
||||
Test_Aio::~Test_Aio (void)
|
||||
{
|
||||
if (close (this->out_fd_) != 0)
|
||||
perror ("close");
|
||||
|
||||
delete aiocb_write_;
|
||||
delete aiocb_read_;
|
||||
delete [] buffer_write_;
|
||||
delete [] buffer_read_;
|
||||
}
|
||||
|
||||
// Init the output file and init the buffer.
|
||||
int
|
||||
Test_Aio::init (void)
|
||||
{
|
||||
// Open the output file.
|
||||
this->out_fd_ = open ("test_aio.log", O_RDWR | O_CREAT | O_TRUNC, 0600);
|
||||
if (this->out_fd_ == -1)
|
||||
{
|
||||
perror ("open");
|
||||
return -1;
|
||||
}
|
||||
|
||||
unlink ("test_aio.log"); // Unlink now so we don't have to do so later.
|
||||
|
||||
const char message[] = "Welcome to the world of AIO... AIO Rules !!!";
|
||||
|
||||
// Init the buffers.
|
||||
this->buffer_write_ = new char [sizeof (message) + 1];
|
||||
strcpy (this->buffer_write_, message);
|
||||
// cout << "The buffer : " << this->buffer_write_ << endl;
|
||||
this->buffer_read_ = new char [sizeof (message) + 1];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Set the necessary things for the AIO stuff.
|
||||
// Write the buffer asynchly.hmm Disable signals.
|
||||
// Go on aio_suspend. Wait for completion.
|
||||
// Print out the result.
|
||||
int
|
||||
Test_Aio::do_aio (void)
|
||||
{
|
||||
// = Write to the file.
|
||||
|
||||
// Setup AIOCB.
|
||||
this->aiocb_write_->aio_fildes = this->out_fd_;
|
||||
this->aiocb_write_->aio_offset = 0;
|
||||
this->aiocb_write_->aio_buf = this->buffer_write_;
|
||||
this->aiocb_write_->aio_nbytes = strlen (this->buffer_write_);
|
||||
this->aiocb_write_->aio_reqprio = 0;
|
||||
this->aiocb_write_->aio_sigevent.sigev_notify = SIGEV_NONE;
|
||||
//this->this->aiocb_.aio_sigevent.sigev_signo = SIGRTMAX;
|
||||
this->aiocb_write_->aio_sigevent.sigev_value.sival_ptr =
|
||||
(void *) this->aiocb_write_;
|
||||
|
||||
// Fire off the aio write.
|
||||
if (aio_write (this->aiocb_write_) != 0)
|
||||
{
|
||||
perror ("aio_write");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// = Read from that file.
|
||||
|
||||
// Setup AIOCB.
|
||||
this->aiocb_read_->aio_fildes = this->out_fd_;
|
||||
this->aiocb_read_->aio_offset = 0;
|
||||
this->aiocb_read_->aio_buf = this->buffer_read_;
|
||||
this->aiocb_read_->aio_nbytes = strlen (this->buffer_write_);
|
||||
this->aiocb_read_->aio_reqprio = 0;
|
||||
this->aiocb_read_->aio_sigevent.sigev_notify = SIGEV_NONE;
|
||||
//this->this->aiocb_.aio_sigevent.sigev_signo = SIGRTMAX;
|
||||
this->aiocb_read_->aio_sigevent.sigev_value.sival_ptr =
|
||||
(void *) this->aiocb_read_;
|
||||
|
||||
// Fire off the aio write. If it doesnt get queued, carry on to get
|
||||
// the completion for the first one.
|
||||
if (aio_read (this->aiocb_read_) < 0)
|
||||
perror ("aio_read");
|
||||
|
||||
// Wait for the completion on aio_suspend.
|
||||
struct aiocb *list_aiocb[2];
|
||||
list_aiocb [0] = this->aiocb_write_;
|
||||
list_aiocb [1] = this->aiocb_read_;
|
||||
|
||||
// Do suspend till all the aiocbs in the list are done.
|
||||
int done = 0;
|
||||
while (!done)
|
||||
{
|
||||
if (aio_suspend (list_aiocb, 2, 0) != 0)
|
||||
{
|
||||
perror ("aio_suspend");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Analyze return and error values.
|
||||
if (list_aiocb [0] != 0 && aio_error (list_aiocb [0]) != EINPROGRESS)
|
||||
{
|
||||
if (aio_return (list_aiocb [0]) == -1)
|
||||
{
|
||||
perror ("aio_return");
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Successful. Store the pointer somewhere and make the
|
||||
// entry NULL in the list.
|
||||
// @@ no need ----> this->aiocb_write_ = list_aiocb [0];
|
||||
list_aiocb [0] = 0;
|
||||
}
|
||||
}
|
||||
// else
|
||||
// cout << "AIO in progress" << endl;
|
||||
|
||||
if (list_aiocb [1] != 0 && aio_error (list_aiocb [1]) != EINPROGRESS)
|
||||
{
|
||||
if (aio_return (list_aiocb [1]) == -1)
|
||||
{
|
||||
perror ("aio_return");
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Successful. Store the pointer somewhere and make the
|
||||
// entry NULL in the list.
|
||||
// @@ no need ----> this->aiocb_read_ = list_aiocb [1];
|
||||
list_aiocb [1] = 0;
|
||||
}
|
||||
}
|
||||
// else
|
||||
// cout << "AIO in progress" << endl;
|
||||
|
||||
// Is it done?
|
||||
if ((list_aiocb [0] == 0) && (list_aiocb [1] == 0))
|
||||
done = 1;
|
||||
}
|
||||
|
||||
//cout << "Both the AIO operations done." << endl;
|
||||
//cout << "The buffer is :" << this->buffer_read_ << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
Test_Aio test_aio;
|
||||
|
||||
if (test_aio.init () != 0)
|
||||
{
|
||||
//printf ("AIOCB test failed:\n"
|
||||
// "ACE_POSIX_AIOCB_PROACTOR may not work in this platform\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (test_aio.do_aio () != 0)
|
||||
{
|
||||
//printf ("AIOCB test failed:\n"
|
||||
// "ACE_POSIX_AIOCB_PROACTOR may not work in this platform\n");
|
||||
return -1;
|
||||
}
|
||||
//printf ("AIOCB test successful:\n"
|
||||
// "ACE_POSIX_AIOCB_PROACTOR should work in this platform\n");
|
||||
return 0;
|
||||
}
|
||||
]])],[
|
||||
ace_cv_feature_aio_calls=yes
|
||||
],[
|
||||
ace_cv_feature_aio_calls=no
|
||||
],[
|
||||
dnl Asynchronous IO test for cross-compiled platforms
|
||||
dnl This test is weaker than the above run-time tests but it will
|
||||
dnl have to do.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <aio.h>
|
||||
]],
|
||||
[[
|
||||
aiocb* aiocb_ptr (void);
|
||||
]])],
|
||||
[
|
||||
ace_cv_feature_aio_calls=yes
|
||||
],
|
||||
[
|
||||
ace_cv_feature_aio_calls=no
|
||||
])
|
||||
])
|
||||
],[AC_DEFINE([ACE_HAS_AIO_CALLS])],[LIBS="$ace_save_LIBS"])
|
||||
fi dnl test "$ace_has_aio_funcs" = yes
|
||||
|
||||
|
||||
if test "$ace_cv_feature_aio_calls" = yes; then
|
||||
ACE_CACHE_CHECK([for working POSIX realtime signals],
|
||||
[ace_cv_feature_posix_rt_sigs],
|
||||
[
|
||||
dnl Create a file for the test program to read.
|
||||
cat > test_aiosig.txt <<EOF
|
||||
|
||||
*******************************************************
|
||||
FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR
|
||||
*******************************************************
|
||||
EOF
|
||||
|
||||
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([[
|
||||
extern "C" {
|
||||
#include <signal.h>
|
||||
}
|
||||
#ifndef ACE_LACKS_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifndef ACE_LACKS_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <aio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void null_handler (int /* signal_number */,
|
||||
siginfo_t * /* info */,
|
||||
void * /* context */);
|
||||
|
||||
int file_handle = -1;
|
||||
char mb1[BUFSIZ + 1];
|
||||
char mb2[BUFSIZ + 1];
|
||||
aiocb aiocb1, aiocb2;
|
||||
sigset_t completion_signal;
|
||||
|
||||
// Function prototypes.
|
||||
int setup_signal_delivery (void);
|
||||
int issue_aio_calls (void);
|
||||
int query_aio_completions (void);
|
||||
int test_aio_calls (void);
|
||||
int setup_signal_handler (void);
|
||||
int setup_signal_handler (int signal_number);
|
||||
|
||||
int
|
||||
setup_signal_delivery (void)
|
||||
{
|
||||
// Make the sigset_t consisting of the completion signal.
|
||||
if (sigemptyset (&completion_signal) == -1)
|
||||
{
|
||||
perror ("Error:Couldn't init the RT completion signal set\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sigaddset (&completion_signal, SIGRTMIN) == -1)
|
||||
{
|
||||
perror ("Error:Couldn't init the RT completion signal set\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Mask them.
|
||||
if (pthread_sigmask (SIG_BLOCK, &completion_signal, 0) == -1)
|
||||
{
|
||||
perror ("Error:Couldn't make the RT completion signals\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return setup_signal_handler (SIGRTMIN);
|
||||
}
|
||||
|
||||
int
|
||||
issue_aio_calls (void)
|
||||
{
|
||||
// Setup AIOCB.
|
||||
aiocb1.aio_fildes = file_handle;
|
||||
aiocb1.aio_offset = 0;
|
||||
aiocb1.aio_buf = mb1;
|
||||
aiocb1.aio_nbytes = BUFSIZ;
|
||||
aiocb1.aio_reqprio = 0;
|
||||
aiocb1.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
|
||||
aiocb1.aio_sigevent.sigev_signo = SIGRTMIN;
|
||||
aiocb1.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb1;
|
||||
|
||||
// Fire off the aio write.
|
||||
if (aio_read (&aiocb1) == -1)
|
||||
{
|
||||
// Queueing failed.
|
||||
perror ("Error:Asynch_Read_Stream: aio_read queueing failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Setup AIOCB.
|
||||
aiocb2.aio_fildes = file_handle;
|
||||
aiocb2.aio_offset = BUFSIZ + 1;
|
||||
aiocb2.aio_buf = mb2;
|
||||
aiocb2.aio_nbytes = BUFSIZ;
|
||||
aiocb2.aio_reqprio = 0;
|
||||
aiocb2.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
|
||||
aiocb2.aio_sigevent.sigev_signo = SIGRTMIN;
|
||||
aiocb2.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb2;
|
||||
|
||||
// Fire off the aio write.
|
||||
if (aio_read (&aiocb2) == -1)
|
||||
{
|
||||
// Queueing failed.
|
||||
perror ("Error:Asynch_Read_Stream: aio_read queueing failed\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
query_aio_completions (void)
|
||||
{
|
||||
int result = 0;
|
||||
size_t number_of_completions = 0;
|
||||
for (number_of_completions = 0;
|
||||
number_of_completions < 2;
|
||||
number_of_completions++)
|
||||
{
|
||||
// Wait for <milli_seconds> amount of time.
|
||||
// @@ Assigning <milli_seconds> to tv_sec.
|
||||
timespec timeout;
|
||||
timeout.tv_sec = 5;
|
||||
timeout.tv_nsec = 0;
|
||||
|
||||
// To get back the signal info.
|
||||
siginfo_t sig_info;
|
||||
|
||||
// Await the RT completion signal.
|
||||
int sig_return = sigtimedwait (&completion_signal,
|
||||
&sig_info,
|
||||
&timeout);
|
||||
|
||||
// Error case.
|
||||
// If failure is coz of timeout, then return *0* but set
|
||||
// errno appropriately. This is what the WinNT proactor
|
||||
// does.
|
||||
if (sig_return == -1)
|
||||
{
|
||||
perror ("Error:Error waiting for RT completion signals\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// RT completion signals returned.
|
||||
if (sig_return != SIGRTMIN)
|
||||
{
|
||||
//printf ("Unexpected signal (%d) has been received while waiting for RT Completion Signals\n",
|
||||
// sig_return);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// @@ Debugging.
|
||||
//printf ("Sig number found in the sig_info block : %d\n",
|
||||
// sig_info.si_signo);
|
||||
|
||||
// Is the signo returned consistent?
|
||||
if (sig_info.si_signo != sig_return)
|
||||
{
|
||||
//printf ("Inconsistent signal number (%d) in the signal info block\n",
|
||||
// sig_info.si_signo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// @@ Debugging.
|
||||
//printf ("Signal code for this signal delivery : %d\n",
|
||||
// sig_info.si_code);
|
||||
|
||||
// Is the signal code an aio completion one?
|
||||
if ((sig_info.si_code != SI_ASYNCIO) &&
|
||||
(sig_info.si_code != SI_QUEUE))
|
||||
{
|
||||
//printf ("Unexpected signal code (%d) returned on completion querying\n",
|
||||
// sig_info.si_code);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Retrive the aiocb.
|
||||
aiocb* aiocb_ptr = (aiocb *) sig_info.si_value.sival_ptr;
|
||||
|
||||
// Analyze error and return values. Return values are
|
||||
// actually <errno>'s associated with the <aio_> call
|
||||
// corresponding to aiocb_ptr.
|
||||
int error_code = aio_error (aiocb_ptr);
|
||||
if (error_code == -1)
|
||||
{
|
||||
perror ("Error:Invalid control block was sent to <aio_error> for compleion querying\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (error_code != 0)
|
||||
{
|
||||
// Error occurred in the <aio_>call. Return the errno
|
||||
// corresponding to that <aio_> call.
|
||||
//printf ("Error:An AIO call has failed:Error code = %d\n",
|
||||
// error_code);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// No error occured in the AIO operation.
|
||||
int nbytes = aio_return (aiocb_ptr);
|
||||
if (nbytes == -1)
|
||||
{
|
||||
perror ("Error:Invalid control block was sent to <aio_return>\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
//if (number_of_completions == 0)
|
||||
// Print the buffer.
|
||||
//printf ("Number of bytes transferred : %d\n The buffer : %s \n",
|
||||
// nbytes,
|
||||
// mb1);
|
||||
//else
|
||||
// Print the buffer.
|
||||
//printf ("Number of bytes transferred : %d\n The buffer : %s \n",
|
||||
// nbytes,
|
||||
// mb2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
test_aio_calls (void)
|
||||
{
|
||||
// Set up the input file.
|
||||
// Open file (in SEQUENTIAL_SCAN mode)
|
||||
file_handle = open ("test_aiosig.txt", O_RDONLY);
|
||||
|
||||
if (file_handle == -1)
|
||||
{
|
||||
perror ("open");
|
||||
return -1;
|
||||
}
|
||||
|
||||
unlink ("test_aiosig.txt"); // Unlink now so we don't have to do so later.
|
||||
|
||||
if (setup_signal_delivery () < 0)
|
||||
return -1;
|
||||
|
||||
if (issue_aio_calls () < 0)
|
||||
return -1;
|
||||
|
||||
if (query_aio_completions () < 0)
|
||||
return -1;
|
||||
|
||||
if (close (file_handle) != 0)
|
||||
{
|
||||
perror ("close");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
setup_signal_handler (int signal_number)
|
||||
{
|
||||
// Setting up the handler(!) for these signals.
|
||||
struct sigaction reaction;
|
||||
sigemptyset (&reaction.sa_mask); // Nothing else to mask.
|
||||
reaction.sa_flags = SA_SIGINFO; // Realtime flag.
|
||||
#if defined (SA_SIGACTION)
|
||||
// Lynx says, it is better to set this bit to be portable.
|
||||
reaction.sa_flags &= SA_SIGACTION;
|
||||
#endif /* SA_SIGACTION */
|
||||
reaction.sa_sigaction = null_handler; // Null handler.
|
||||
int sigaction_return = sigaction (SIGRTMIN,
|
||||
&reaction,
|
||||
0);
|
||||
if (sigaction_return == -1)
|
||||
{
|
||||
perror ("Error:Proactor couldn't do sigaction for the RT SIGNAL");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
null_handler (int /* signal_number */,
|
||||
siginfo_t * /* info */,
|
||||
void * /* context */)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (test_aio_calls () == 0)
|
||||
{
|
||||
// printf ("RT SIG test successful:\n"
|
||||
// "ACE_POSIX_SIG_PROACTOR should work in this platform\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//printf ("RT SIG test failed:\n"
|
||||
// "ACE_POSIX_SIG_PROACTOR may not work in this platform\n");
|
||||
return -1;
|
||||
|
||||
}
|
||||
]])],
|
||||
[
|
||||
ace_cv_feature_posix_rt_sigs=yes
|
||||
],
|
||||
[
|
||||
ace_cv_feature_posix_rt_sigs=no
|
||||
],
|
||||
[
|
||||
dnl Don't bother doing anything for cross-compiling here
|
||||
dnl since the basic aio run-time test will prevent this
|
||||
dnl rt sig run-time test from ever running when cross-compiling.
|
||||
dnl We just put something in here to prevent autoconf
|
||||
dnl from complaining.
|
||||
ace_just_a_place_holder=ignoreme
|
||||
])
|
||||
],[AC_DEFINE([ACE_HAS_POSIX_REALTIME_SIGNALS])],[])
|
||||
fi dnl test "$ace_cv_feature_aio_calls" = yes
|
||||
|
||||
])
|
||||
@@ -0,0 +1,426 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: compiler.m4 80826 2008-03-04 14:51:23Z wotte $
|
||||
dnl
|
||||
dnl compiler.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains ACE specific M4 macros
|
||||
dnl that set/determine compiler configurations for ACE.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 1998, 1999, 2003 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
dnl Macros to set flags for a given compiler on a given platform.
|
||||
dnl The flags set here are generally only useful for _KNOWN_ compilers.
|
||||
|
||||
dnl ACE_SET_COMPILER_FLAGS
|
||||
dnl Usage: ACE_SET_COMPILER_FLAGS
|
||||
AC_DEFUN([ACE_SET_COMPILER_FLAGS],
|
||||
[
|
||||
dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])
|
||||
|
||||
dnl Make sure we know what C++ compiler and preprocessor we have!
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_LANG([C++])
|
||||
AC_REQUIRE([AC_LANG])
|
||||
|
||||
AC_REQUIRE([ACE_COMPILATION_OPTIONS])
|
||||
|
||||
ACE_GXX_MAJOR_VERSION=0
|
||||
|
||||
if test "$GXX" = yes; then
|
||||
ACE_GXX_MAJOR_VERSION=`$CXX -dumpversion | sed -e 's/\..*$//'`
|
||||
|
||||
dnl @todo Clean up / consolidate these conditionals
|
||||
|
||||
if test "$ACE_GXX_MAJOR_VERSION -ge 3"; then
|
||||
if test "$ace_user_enable_exceptions" != yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -fcheck-new"
|
||||
fi
|
||||
else
|
||||
case `$CXX --version` in
|
||||
2.9*)
|
||||
if test "$ace_user_enable_exceptions" != yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -fcheck-new"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Compiler Flag Key
|
||||
dnl CXXFLAGS - C++ flags to use during the configure script run and
|
||||
dnl during ACE compilation. The user may set this prior to
|
||||
dnl running the configure script. As such, it is important
|
||||
dnl not to replace the existing value of CXXFLAGS; rather
|
||||
dnl one should only add to it.
|
||||
dnl ACE_CXXFLAGS
|
||||
dnl - General C++ flags the configure script should set before
|
||||
dnl CXXFLAGS to allow the user override them.
|
||||
dnl DCXXFLAGS - C++ debugging flags
|
||||
dnl OCXXFLAGS - C++ optimization flags
|
||||
dnl CPPFLAGS - C++ preprocessor flags
|
||||
dnl ACE_CPPFLAGS
|
||||
dnl - General C++ preprocessor flags the configure
|
||||
dnl script should set before CPPFLAGS to allow the
|
||||
dnl user to override them.
|
||||
dnl WERROR - Compiler flag that converts warnings to errors
|
||||
|
||||
if test "$GXX" = yes; then
|
||||
WERROR="-Werror"
|
||||
fi
|
||||
|
||||
case "$host" in
|
||||
*aix*)
|
||||
dnl In case anything here or in the config depends on OS
|
||||
dnl version number, grab it here and pass it all to the
|
||||
dnl compiler as well.
|
||||
AIX_VERS=`uname -v`0`uname -r`
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -DACE_AIX_VERS=$AIX_VERS"
|
||||
|
||||
case "$CXX" in
|
||||
xlC*)
|
||||
dnl AIX compilers need to have RTTI enabled and ACE requires it.
|
||||
CXXFLAGS="$CXXFLAGS -qrtti=all"
|
||||
TEMPLATE_OPTION='-qnotempinc -qnotemplateregistry -DACE_TEMPLATES_REQUIRE_SOURCE'
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS $TEMPLATE_OPTION"
|
||||
DCXXFLAGS="-g -qcheck=nobounds:div:null"
|
||||
OCXXFLAGS="-qlibansi -qarch=com"
|
||||
CPPFLAGS="$CPPFLAGS"
|
||||
# Use -qhalt=i to cause the compiler to signal failure on any
|
||||
# diagnostic when converting warnings to errors. This helps to
|
||||
# find that #pragma once is invalid, even though xlC only triggers
|
||||
# an informational message, not a warning.
|
||||
WERROR="-qhalt=i"
|
||||
;;
|
||||
*)
|
||||
if test "$GXX" = yes; then
|
||||
ACE_CXXFLAGS="-mcpu=common"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*chorus*)
|
||||
;;
|
||||
*cray*)
|
||||
;;
|
||||
*dgux*)
|
||||
case "$CXX" in
|
||||
ec++)
|
||||
CXXFLAGS="$CXXFLAGS"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -relax -v -eh"
|
||||
DCXXFLAGS="-g"
|
||||
OCXXFLAGS=""
|
||||
;;
|
||||
*)
|
||||
if test "$GXX" = yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*freebsd*)
|
||||
;;
|
||||
*hpux*)
|
||||
# In case anything here or in the config depends on OS
|
||||
# version number, grab it here and pass it all to the
|
||||
# compiler as well.
|
||||
OSVERS=`uname -r | $AWK 'BEGIN{FS=".";OFS="";}{print [$][2],[$][3]}' -`
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -DHPUX_VERS=$OSVERS"
|
||||
|
||||
# HP-UX OS version specific settings.
|
||||
case "$host" in
|
||||
*hpux11*)
|
||||
# aCC's "-mt" flag detected by the configure script should already set
|
||||
# the appropriate preprocessor, compiler and linker flags.
|
||||
# if test "$ace_user_enable_threads" = yes; then
|
||||
# # Prefer kernel threads over CMA (user) threads.
|
||||
# ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX_C_SOURCE=199506L"
|
||||
# fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# HP-UX compiler specific settings.
|
||||
case "$CXX" in
|
||||
CC)
|
||||
CXXFLAGS="$CXXFLAGS -pta -ti,/bin/true -tr,/bin/true"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -Aa -z +a1"
|
||||
DCXXFLAGS="-g"
|
||||
OCXXFLAGS=""
|
||||
;;
|
||||
aCC)
|
||||
CFLAGS = "${CFLAGS:-} -Ae"
|
||||
# -AA has been available since aC++ x.27 (2001?) - if using a
|
||||
# compiler without this support, must --enable_stdcpplib=no.
|
||||
if test "$ace_user_enable_stdcpplib" = yes; then
|
||||
CXXFLAGS="$CXXFLAGS -AA"
|
||||
fi
|
||||
# Warning 930 is spurious when new(std::nothrow) is
|
||||
# used. Reported to HP as support call 3201224717. (Steve
|
||||
# Huston, 23-Nov-2002)
|
||||
#
|
||||
# Suppress warning 302 ((...) parameter list is a
|
||||
# non-portable feature)
|
||||
#
|
||||
# Additionally, on HP-UX 10.20, suppress 495 to shut up the
|
||||
# warnings from the system header files. 667 is also
|
||||
# suppressed, but the compiler still tells you there was a
|
||||
# future error, but at least you can pick out any real errors
|
||||
# by quickly scanning the output. 829 is suppressed because
|
||||
# the system headers have offending string literals assigned
|
||||
# to char *.
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS +W302,495,667,829,908,930"
|
||||
DCXXFLAGS="-g"
|
||||
OCXXFLAGS="-O"
|
||||
# Warning 67: Invalid pragma name -- needed for
|
||||
# ACE_LACKS_PRAGMA_ONCE
|
||||
WERROR="+We67 +p +We"
|
||||
|
||||
# If exception support is explicitly disabled, tell the
|
||||
# compiler. This is not recommended since the run-time
|
||||
# library can throw exceptions.
|
||||
if test "$ace_user_enable_exceptions" != yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS +noeh"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "$GXX" = yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -w"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*irix5*)
|
||||
case "$CXX" in
|
||||
CC)
|
||||
CXXFLAGS="$CXXFLAGS -ptused -prelink +pp -woff 3203,3209,3161,3262,3665"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS "
|
||||
DCXXFLAGS="-g"
|
||||
OCXXFLAGS=""
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*irix6*)
|
||||
case "$CXX" in
|
||||
CC)
|
||||
CPPFLAGS="$CPPFLAGS -D_SGI_MP_SOURCE"
|
||||
CXXFLAGS="$CXXFLAGS -exceptions -ptnone -no_prelink -Wl,-woff,15 -Wl,-woff,84 -Wl,-woff,85 -Wl,-woff,133"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS "
|
||||
DCXXFLAGS="-g"
|
||||
OCXXFLAGS="-O -OPT:Olimit=0"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*linux*)
|
||||
case "$CXX" in
|
||||
*icpc|*icc)
|
||||
CXXFLAGS="$CXXFLAGS -i-dynamic -w1"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS"
|
||||
DCXXFLAGS="$DCXXFLAGS"
|
||||
WERROR="-Werror -wr -Wall"
|
||||
;;
|
||||
*)
|
||||
if test "$GXX" = yes; then
|
||||
CXXFLAGS="$CXXFLAGS"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS"
|
||||
DCXXFLAGS="$DCXXFLAGS"
|
||||
OCXXFLAGS="-O3"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*lynxos*)
|
||||
;;
|
||||
*m88k*)
|
||||
;;
|
||||
*mvs*)
|
||||
;;
|
||||
*netbsd*)
|
||||
;;
|
||||
*osf*)
|
||||
;;
|
||||
*psos*)
|
||||
;;
|
||||
*sco*)
|
||||
;;
|
||||
*sunos4*)
|
||||
;;
|
||||
*solaris2*)
|
||||
case "$CXX" in
|
||||
CC)
|
||||
WERROR="-xwe"
|
||||
|
||||
if test "$ace_user_enable_exceptions" != yes; then
|
||||
CXXFLAGS="$CXXFLAGS -noex"
|
||||
fi
|
||||
|
||||
dnl Some flags only work with Sun C++ 4.2. ACE requires RTTI.
|
||||
if (CC -V 2>&1 | $EGREP 'Compilers 4\.2' > /dev/null); then
|
||||
CXXFLAGS="$CXXFLAGS -features=castop -features=rtti"
|
||||
fi
|
||||
|
||||
dnl Sun C++ 5.0 weirdness
|
||||
if (CC -V 2>&1 | $EGREP 'Compilers 5\.0' > /dev/null); then
|
||||
if test "$ace_user_enable_stdcpplib" = yes; then
|
||||
CXXFLAGS="$CXXFLAGS -library=Cstd"
|
||||
else
|
||||
CXXFLAGS="$CXXFLAGS -library=iostream,no%Cstd"
|
||||
AC_DEFINE([ACE_USES_OLD_IOSTREAMS])
|
||||
fi
|
||||
|
||||
dnl Inlining appears to cause link problems with early
|
||||
dnl releases of CC 5.0.
|
||||
AC_DEFINE([ACE_LACKS_INLINE_FUNCTIONS])
|
||||
|
||||
if test "$ace_user_enable_exceptions" != yes; then
|
||||
dnl See /opt/SUNWspro_5.0/SC5.0/include/CC/stdcomp.h.
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_RWSTD_NO_EXCEPTIONS"
|
||||
fi
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -instances=explicit"
|
||||
fi
|
||||
|
||||
CXXFLAGS="$CXXFLAGS"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS"
|
||||
DCXXFLAGS="$DCXXFLAGS -g"
|
||||
OCXXFLAGS="$OCXXFLAGS -O"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*tandem*)
|
||||
;;
|
||||
*unixware*)
|
||||
;;
|
||||
*vxworks*)
|
||||
;;
|
||||
*)
|
||||
CXXFLAGS="$CXXFLAGS"
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS"
|
||||
DCXXFLAGS="-g"
|
||||
OCXXFLAGS="-O"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Warning flags
|
||||
if test "$GCC" = yes; then
|
||||
ACE_CFLAGS="$ACE_CFLAGS -W -Wall -Wpointer-arith"
|
||||
fi
|
||||
if test "$GXX" = yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -W -Wall -Wpointer-arith"
|
||||
fi
|
||||
|
||||
dnl Symbol Visibility flags
|
||||
dnl Take advantage of visibility attributes when using g++ 4.0 or
|
||||
dnl better.
|
||||
if test "$GXX" = yes; then
|
||||
dnl As of this writing, there are symbol visibility issues on some
|
||||
dnl platforms. The --disable-symbol-visibility option is intended
|
||||
dnl to allow users to explicitly disable symbol visibility support
|
||||
dnl in the cases where it does not work (or does not work properly),
|
||||
dnl but the feature test selects it anyway.
|
||||
|
||||
AC_ARG_ENABLE([symbol-visibility],
|
||||
AS_HELP_STRING([--enable-symbol-visibility],
|
||||
[build with gcc symbol visibility attributes [[[no]]]]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ace_user_enable_symbol_visibility=yes
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_symbol_visibility=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-symbol-visibility])
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[
|
||||
ace_user_enable_symbol_visibility=no
|
||||
])
|
||||
|
||||
if test "$ace_user_enable_symbol_visibility" = yes; then
|
||||
ACE_CHECK_CXXFLAGS([fvisibility=hidden],
|
||||
[
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -fvisibility=hidden"
|
||||
AC_DEFINE([ACE_HAS_CUSTOM_EXPORT_MACROS])
|
||||
AC_DEFINE([ACE_Proper_Export_Flag],
|
||||
[__attribute__ ((visibility("default")))])
|
||||
])
|
||||
ACE_CHECK_CXXFLAGS([fvisibility-inlines-hidden],
|
||||
[
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -fvisibility-inlines-hidden"
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Additional flags
|
||||
if test "$GXX" = yes; then
|
||||
case `$CXX --version` in
|
||||
2.9*)
|
||||
if test "$ace_user_enable_exceptions" != yes; then
|
||||
ACE_CXXFLAGS="$ACE_CXXFLAGS -fcheck-new"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl if test "$ace_user_enable_repo" = no; then
|
||||
dnl ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-implicit-templates"
|
||||
dnl fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([ACE_CHECK_CFLAGS],
|
||||
[
|
||||
AS_VAR_PUSHDEF([VAR],'ace_cv_cflag_$1')
|
||||
AC_MSG_CHECKING([whether $CC supports -$1])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG([C])
|
||||
ace_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -$1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0])],[VAR=yes],[VAR=no])
|
||||
CFLAGS=$ace_save_CFLAGS
|
||||
AC_LANG_RESTORE
|
||||
if test $VAR = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
$2
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
$3
|
||||
fi
|
||||
AS_VAR_POPDEF([VAR])
|
||||
])
|
||||
|
||||
AC_DEFUN([ACE_CHECK_CXXFLAGS],
|
||||
[
|
||||
AS_VAR_PUSHDEF([VAR],'ace_cv_cxxflag_$1')
|
||||
AC_MSG_CHECKING([whether $CXX supports -$1])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG([C++])
|
||||
ace_save_CXXFLAGS=$CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS -$1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0])],[VAR=yes],[VAR=no])
|
||||
CXXFLAGS=$ace_save_CXXFLAGS
|
||||
AC_LANG_RESTORE
|
||||
if test $VAR = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
$2
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
$3
|
||||
fi
|
||||
AS_VAR_POPDEF([VAR])
|
||||
])
|
||||
@@ -0,0 +1,976 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: config_h.m4 82277 2008-07-09 17:45:59Z jtc $
|
||||
dnl
|
||||
dnl config_h.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains preprocessor constants
|
||||
dnl and other items to be place in the generated ace/config.h
|
||||
dnl header.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 2002, 2003 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
dnl Prepare the ace/config.h.in template.
|
||||
dnl
|
||||
dnl Usage: ACE_PREP_CONFIG_HEADER
|
||||
AC_DEFUN([ACE_PREP_CONFIG_HEADER],
|
||||
[
|
||||
dnl Text to be placed at the top of the `ace/config.h' header.
|
||||
AH_TOP([
|
||||
#ifndef ACE_CONFIG_H
|
||||
#define ACE_CONFIG_H
|
||||
|
||||
// ACE configuration header file
|
||||
|
||||
|
||||
])
|
||||
|
||||
dnl Text to be placed at the bottom of the `ace/config.h' header.
|
||||
dnl
|
||||
dnl @note Do not remove the "] [" between the words "Local Variables".
|
||||
dnl The generated Emacs "Local Variables" block will not contain
|
||||
dnl those characters. They are merely interpreted by M4 as two
|
||||
dnl concatenated text blocks. This is necessary to prevent
|
||||
dnl Emacs from inadvertently applying the "Local Variables"
|
||||
dnl block being placed in the generated "config.h" header to
|
||||
dnl this Autoconf/M4 file.
|
||||
AH_BOTTOM([
|
||||
|
||||
|
||||
#endif /* ACE_CONFIG_H */
|
||||
|
||||
|
||||
// Local] [Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
|
||||
])
|
||||
|
||||
|
||||
dnl ACE currently doesn't use these; however the configure script does
|
||||
AH_TEMPLATE([ACE_LACKS_UNBUFFERED_STREAMBUF],[])
|
||||
AH_TEMPLATE([ACE_HAS_STDCPP_STL_INCLUDES],[])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NEW_NO_H],[Platform provides new style C++ <new> header])
|
||||
AH_TEMPLATE([ACE_HAS_STDEXCEPT_NO_H],[Platform provides C++ <stdexcept> header])
|
||||
|
||||
dnl Deprecated! (or soon to be?)
|
||||
AH_TEMPLATE([ACE_HAS_OSF1_GETTIMEOFDAY],
|
||||
[timezone* 2nd parameter & no prototype])
|
||||
AH_TEMPLATE([ACE_HAS_LYNXOS_SIGNALS],[])
|
||||
AH_TEMPLATE([ACE_HAS_TANDEM_SIGNALS],[])
|
||||
|
||||
AH_TEMPLATE([PTHREAD_STACK_MIN],[])
|
||||
|
||||
dnl ///////////////////// OSSAMA'S NEW STUFF ////////////////// */
|
||||
dnl THIS STUFF WILL REPLACE THE ABOVE OLDER STUFF AND/OR WILL BE MERGED INTO IT
|
||||
|
||||
|
||||
dnl /* results from checks for programs */
|
||||
dnl /* results from checks for libraries */
|
||||
dnl /* results from checks for header files */
|
||||
dnl /* results from checks for typedefs */
|
||||
dnl /* results from checks for structures */
|
||||
dnl /* results from checks for variables */
|
||||
dnl /* results from checks for compiler characteristics */
|
||||
dnl /* results from checks for library functions */
|
||||
dnl /* results from checks for system services */
|
||||
|
||||
dnl AIX specific configuration parameters
|
||||
AH_TEMPLATE([AIX],[Configure for use on AIX])
|
||||
|
||||
dnl FreeBSD specific configuration parameters
|
||||
dnl Nothing yet
|
||||
|
||||
dnl HP/UX specific configuration parameters
|
||||
AH_TEMPLATE([HPUX],[Configure for use on HP-UX])
|
||||
AH_TEMPLATE([HPUX_10],[Configure for use on HP-UX 10])
|
||||
AH_TEMPLATE([HPUX_11],[Configure for use on HP-UX 11])
|
||||
|
||||
dnl Irix specific configuration parameters
|
||||
AH_TEMPLATE([IRIX5],[Configure for use on Irix 5])
|
||||
AH_TEMPLATE([IRIX6],[Configure for use on Irix 6])
|
||||
AH_TEMPLATE([ACE_HAS_IRIX62_THREADS],
|
||||
[Platform supports the very odd IRIX 6.2 threads...])
|
||||
|
||||
dnl Linux specific configuration parameters
|
||||
dnl Nothing yet */
|
||||
|
||||
dnl LynxOS specific configuration parameters
|
||||
AH_TEMPLATE([__NO_INCLUDE_WARN__],[])
|
||||
|
||||
dnl MVS specific configuration parameters
|
||||
dnl Nothing yet
|
||||
|
||||
dnl NetBSD specific configuration parameters
|
||||
dnl Nothing yet
|
||||
|
||||
dnl OSF/1 and Digital Unix specific configuration parameters
|
||||
AH_TEMPLATE([DEC_CXX],[])
|
||||
AH_TEMPLATE([DIGITAL_UNIX],[Configure for use on Digital Unix])
|
||||
|
||||
dnl SCO specific configuration parameters
|
||||
AH_TEMPLATE([SCO],[])
|
||||
|
||||
dnl Tandem specific configuration parameters
|
||||
dnl Nothing yet
|
||||
|
||||
dnl UnixWare specific configuration parameters
|
||||
AH_TEMPLATE([UNIXWARE],[Configure for use on UnixWare])
|
||||
AH_TEMPLATE([UNIXWARE_2_0],[])
|
||||
AH_TEMPLATE([UNIXWARE_2_1],[])
|
||||
AH_TEMPLATE([UNIXWARE_7_1],[])
|
||||
AH_TEMPLATE([__IOCTL_VERSIONED__],[])
|
||||
|
||||
dnl VXWorks specific configuration parameters
|
||||
AH_TEMPLATE([VXWORKS],[Configure for use on VxWorks])
|
||||
|
||||
dnl Win32 specific configuration parameters
|
||||
AH_TEMPLATE([ACE_WIN32],[Configure for use on Win32])
|
||||
|
||||
AH_TEMPLATE([ACE_DISABLE_DEBUG_DLL_CHECK],
|
||||
[Define this if you don't want debug version ACE search for debug version
|
||||
DLLs first before looking for the DLL names specified.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS],
|
||||
[Platform/compiler supports Win32 structural exceptions.])
|
||||
|
||||
AH_TEMPLATE([ACE_WSOCK_VERSION],
|
||||
[A parameter list indicating the version of WinSock (e.g., "1, 1" is
|
||||
version 1.1).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_MFC],[Platform supports Microsoft Foundation Classes])
|
||||
|
||||
AH_TEMPLATE([ACE_USES_STATIC_MFC],
|
||||
[When linking MFC as a static library is desired])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CANCEL_IO],
|
||||
[Platform supports the Win32 CancelIO() function. (WinNT 4.0 and beyond)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_WIN32_TRYLOCK],
|
||||
[The Win32 platform support TryEnterCriticalSection(). (WinNT 4.0 and
|
||||
beyond)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_WINSOCK2],[The Win32 platform supports WinSock 2.0.])
|
||||
|
||||
AH_TEMPLATE([ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL],
|
||||
[For Win32: Use Select_Reactor as default implementation of Reactor
|
||||
instead of WFMO_Reactor.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_DLL],[Build ACE using the frigging PC DLL nonsense...])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STRICT],[Use the STRICT compilation mode on Win32.])
|
||||
|
||||
AH_TEMPLATE([CYGWIN32], [GNU Win32 environement])
|
||||
|
||||
|
||||
dnl ACE internals
|
||||
AH_TEMPLATE([ACE_DEFAULT_BASE_ADDR],[])
|
||||
AH_TEMPLATE([ACE_DEFAULT_BASE_ADDRL],[])
|
||||
AH_TEMPLATE([ACE_DEFAULT_CLOSE_ALL_HANDLES],[])
|
||||
AH_TEMPLATE([ACE_DEFAULT_MAX_SOCKET_BUFSIZ],[])
|
||||
AH_TEMPLATE([ACE_DEFAULT_SELECT_REACTOR_SIZE],[The default number of handles the select()-based reactor should handle])
|
||||
AH_TEMPLATE([ACE_MALLOC_ALIGN],[])
|
||||
AH_TEMPLATE([ACE_MAP_PRIVATE],[])
|
||||
AH_TEMPLATE([ACE_THR_PRI_FIFO_DEF],[])
|
||||
AH_TEMPLATE([ACE_TIMER_SKEW],[])
|
||||
AH_TEMPLATE([IP_ADD_MEMBERSHIP],[])
|
||||
AH_TEMPLATE([IP_DROP_MEMBERSHIP],[])
|
||||
|
||||
AH_TEMPLATE([ACE_LOFF_T_TYPEDEF],[typedef for ACE_LOFF_T])
|
||||
|
||||
AH_TEMPLATE([__ACE_INLINE__],[Enable ACE inlining])
|
||||
|
||||
AH_TEMPLATE([ACE_NO_INLINE],[Explicitly disable ACE inlining])
|
||||
|
||||
AH_TEMPLATE([ACE_COMPILE_TIMEPROBES],[Enable ACE_Timeprobes])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_GNU_REPO],
|
||||
[Enable use of GNU template repositories. GNU C++ w/repo patch
|
||||
and EGCS only])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_AIO_CALLS],[Platform supports Asynchronous IO calls])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_ALT_CUSERID],
|
||||
[Use ACE's alternate cuserid() implementation since a system
|
||||
cuserid() may not exist, or it is not desirable to use it. The
|
||||
implementation requires ACE_LACKS_PWD_FUNCTIONS to be undefined and
|
||||
that the geteuid() system call exists.])
|
||||
|
||||
AH_TEMPLATE([ACE_DEFAULT_THREAD_KEYS],
|
||||
[Number of TSS keys, with ACE_HAS_TSS_EMULATION _only_. Defaults to 64.])
|
||||
|
||||
AH_TEMPLATE([ACE_THREADS_DONT_INHERIT_LOG_MSG],
|
||||
[Specify this if you don't want threads to inherit parent thread's
|
||||
ACE_Log_Msg properties.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_PRIOCNTL],[OS has priocntl (2)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_RLIMIT_RESOURCE_ENUM],
|
||||
[Platform has enum instead of int for first argument to ::{get,set}rlimit ().
|
||||
The value of this macro is the enum definition, e.g.,
|
||||
enum __rlimit_resource, for Linux glibc 2.0.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_RUSAGE_WHO_ENUM],
|
||||
[Platform has enum instead of int for first argument to ::getrusage (). The
|
||||
value of this macro is the enum definition, e.g., enum __rusage_who, for
|
||||
Linux glibc 2.0.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STDARG_THR_DEST],
|
||||
[Platform has void (*)(...) prototype for pthread_key_create()
|
||||
destructor (e.g., LynxOS).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STL_MAP_CONFLICT],
|
||||
[Used when users want to compile ACE with STL and STL map class
|
||||
conflicts with <net/if.h> map struct.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STL_QUEUE_CONFLICT],
|
||||
[Used when users want to compile ACE with STL and STL queue class
|
||||
conflicts with <netinet/in.h> queue struct.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_4_4BSD_SENDMSG_RECVMSG],
|
||||
[Platform has BSD 4.4 sendmsg()/recvmsg() APIs.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_P_READ_WRITE],
|
||||
[Platform has pread() and pwrite() support.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_AIX_HI_RES_TIMER],
|
||||
[Platform has AIX4 ::read_real_time()])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_ALLOCA],[Compiler/platform supports alloca().])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_ALLOCA_H],[Compiler/platform has <alloca.h>])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_AUTOMATIC_INIT_FINI],
|
||||
[Compiler/platform correctly calls init()/fini() for shared libraries.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR],
|
||||
[Compiler handles explicit calling of template destructor correctly.])
|
||||
|
||||
AH_TEMPLATE([ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS],
|
||||
[Compiler requires template args when explicitly calling template destructor.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_MAP_FAILED],
|
||||
[Platform doesn't cast MAP_FAILED to a (void *).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_CTIME],
|
||||
[Compiler/platform uses macro for ctime (e.g., MVS)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_DGRAM_SENDV],
|
||||
[Platform sendv() does not work properly with datagrams, i.e. it
|
||||
fails when the iovec size is IOV_MAX.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_MSG_H],
|
||||
[Platform headers don't support <msg.h> prototypes])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_MMAP_H],
|
||||
[HP/UX does not wrap the mmap(2) header files with extern "C".])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_POSIX_TIME],
|
||||
[Platform defines struct timespec in <sys/timers.h>])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_R_ROUTINES],
|
||||
[Platform defines ctime_r, asctime_r, rand_r and getpwnam_r as macros])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_RANDR],
|
||||
[OS/compiler's header files are inconsistent with libC definition of
|
||||
rand_r().])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BROKEN_T_ERROR],
|
||||
[Compiler/platform has the wrong prototype for t_error(), i.e.,
|
||||
t_error(char *) rather than t_error(const char *).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BSTRING],
|
||||
[Platform has <bstring.h> (which contains bzero() prototype)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CHARPTR_DL],
|
||||
[OS/platform uses char * for dlopen/dlsym args, rather than const char *.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CHARPTR_SOCKOPT],
|
||||
[OS/platform uses char * for sockopt, rather than const char *])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CONFLICTING_XTI_MACROS],
|
||||
[OS header files have some problems with XTI (HP/UX 11).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES],
|
||||
[Prototypes for both signal() and struct sigaction are consistent.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CONST_CHAR_SWAB],
|
||||
[Platform has swab(const char*, char*, ssize_t) variant.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_CPLUSPLUS_HEADERS],
|
||||
[Compiler/platform has correctly prototyped header files.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_DIRENT],
|
||||
[Platform supports operations on directories via struct dirent,
|
||||
readdir_r, etc.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_EXCEPTIONS],[Compiler supports C++ exception handling.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_FL],[Platform has Fast-Light (FL) toolkit installed.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_GETPAGESIZE],
|
||||
[Platform supports getpagesize() call (otherwise, ACE_PAGE_SIZE must
|
||||
be defined, except on Win32).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_GNU_CSTRING_H],
|
||||
[Denotes that GNU has cstring.h as standard which redefines memchr()])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_INTRINSIC_INTERLOCKED],
|
||||
[Platform supports the intrinsic interlocked optimizations.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_GPERF],
|
||||
[The GPERF utility is compiled for this platform])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT],
|
||||
[Optimize ACE_Handle_Set::count_bits for select() operations (common case)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_LSEEK64],
|
||||
[Platform supports lseek64(). This should not be defined if
|
||||
ACE_HAS_LLSEEK is defined.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_LLSEEK],
|
||||
[Platform supports llseek(). This should not be defined if
|
||||
ACE_HAS_LSEEK64 is defined.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_HI_RES_TIMER],
|
||||
[Compiler/platform supports SunOS high resolution timers])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_INLINED_OSCALLS],[
|
||||
Inline all the static class OS methods to remove call overhead
|
||||
Note: This gets defined by OS.h if __ACE_INLINE__ is defined])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_IP_MULTICAST],[Platform supports IP multicast])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_IPV6],[Platform supports IPv6])
|
||||
AH_TEMPLATE([ACE_USES_IPV4_IPV6_MIGRATION],
|
||||
[Enable IPv6 support on platforms that don't have IPv6 turned on by default])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NEW_NOTHROW],
|
||||
[Compiler supports new (std::nothrow)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_SWAB],
|
||||
[Platform has swab(char*, char*, ssize_t) variant.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONSTATIC_OBJECT_MANAGER],
|
||||
[Causes the ACE_Object_Manager instance to be created in
|
||||
main (int, char *[]), instead of as a static (global) instance.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THR_KEYDELETE],
|
||||
[Platform supports thr_keydelete (e.g,. UNIXWARE)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THR_MINSTACK],
|
||||
[Platform calls thr_minstack() rather than thr_min_stack() (e.g., Tandem).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_LIMITED_RUSAGE_T],
|
||||
[The rusage_t structure has only two fields.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_BIG_FD_SET],
|
||||
[Compiler/platform has "big" fd_set, i.e. large number of bits set
|
||||
in fd_set passed back from select().])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_LONG_MAP_FAILED],
|
||||
[Platform defines MAP_FAILED as a long constant.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_MALLOC_STATS], [Enabled malloc statistics collection.])
|
||||
|
||||
AH_TEMPLATE([ACE_USES_OLD_IOSTREAMS],
|
||||
[Some files, such as ace/streams.h, want to include new style C++
|
||||
stream headers. These headers are iomanip, ios, iostream, istream,
|
||||
ostream, fstream and streambuf. If _all_ of these headers aren't
|
||||
available, then assume that only iostream.h and fstream.h are
|
||||
available.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_MSG],[Platform supports recvmsg and sendmsg])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_MT_SAFE_MKTIME],
|
||||
[Platform supports MT safe mktime() call (do any of them?)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_MT_SAFE_SOCKETS],
|
||||
[Sockets may be called in multi-threaded programs])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_GETBY],
|
||||
[Platform uses non-const char * in calls to gethostbyaddr,
|
||||
gethostbyname, getservbyname])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_MSGSND],
|
||||
[Platform has a non-const parameter to msgsnd() (e.g., SCO).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_READV],
|
||||
[Platform omits const qualifier from iovec parameter in readv() prototype.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_SELECT_TIMEVAL],
|
||||
[Platform's select() uses non-const timeval* (only found on Linux
|
||||
right now)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_SENDMSG],
|
||||
[Platform omits const qualifier from msghdr parameter in sendmsg()
|
||||
prototype.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_SETRLIMIT],
|
||||
[Platform omits const qualifier from rlimit parameter in setrlimit()
|
||||
prototype.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_NONCONST_WRITEV],
|
||||
[Platform omits const qualifier from iovec parameter in writev() prototype.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_OLD_MALLOC],
|
||||
[Compiler/platform uses old malloc()/free() prototypes (ugh)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R],
|
||||
[Uses ctime_r & asctime_r with only two parameters vs. three.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_ONLY_SCHED_OTHER],
|
||||
[Platform, e.g., Solaris 2.5, only supports SCHED_OTHER POSIX
|
||||
scheduling policy.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_OPTIMIZED_MESSAGE_QUEUE],
|
||||
[Use the semaphore implementation of ACE_Message_Queue rather than
|
||||
the emulated condition variable (NT and VxWorks).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_OSF_TIMOD_H],
|
||||
[Platform supports the OSF TLI timod STREAMS module])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POLL],[Platform contains <poll.h>])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSITION_INDEPENDENT_POINTERS],
|
||||
[Platform supports "position-independent" features provided by
|
||||
ACE_Based_Pointer<>.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSIX_GETPWNAM_R],
|
||||
[Platform supports POSIX getpwnam_r() function])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSIX_NONBLOCK],
|
||||
[Platform supports POSIX O_NONBLOCK semantics])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSIX_REALTIME_SIGNALS],
|
||||
[Platform supports POSIX realtime signals])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSIX_SEM],
|
||||
[Platform supports POSIX real-time semaphores (e.g., VxWorks and
|
||||
Solaris)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSIX_SEM_TIMEOUT],
|
||||
[Platform supports timed POSIX semaphore acquisitions (sem_timedwait()).])
|
||||
|
||||
AH_TEMPLATE([ACE_DISABLE_POSIX_SEM_TIMEOUT_EMULATION],
|
||||
[Do not include emulation for timed semaphore acquisitions.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_POSIX_TIME],
|
||||
[Platform supports the POSIX struct timespec type])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_PROC_FS],
|
||||
[Platform supports the /proc file system and defines tid_t
|
||||
in <sys/procfs.h>])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_PRUSAGE_T],[Platform supports the prusage_t struct])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_PTHREADS_UNIX98_EXT],
|
||||
[Platform has the UNIX98 extensions to Pthreads (rwlocks)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_PTHREAD_PROCESS_ENUM],
|
||||
[pthread.h declares an enum with PTHREAD_PROCESS_PRIVATE and
|
||||
PTHREAD_PROCESS_SHARED values])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_PURIFY],[Purify'ing. Defined on command line.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_QUANTIFY],[Quantify'ing. Defined on command line.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_RECURSIVE_MUTEXES],
|
||||
[Mutexes are inherently recursive (e.g., Win32) ])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS],
|
||||
[Platform will recurse infinitely on thread exits from TSS cleanup
|
||||
routines (e.g., AIX)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SIGACTION_CONSTP2],
|
||||
[Platform's sigaction() function takes const sigaction* as 2nd parameter])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_REENTRANT_FUNCTIONS],
|
||||
[Platform supports reentrant functions (i.e., all the POSIX *_r
|
||||
functions).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_X86_STAT_MACROS],
|
||||
[Solaris for intel uses macros for fstat() and stat(), these are
|
||||
wrappers for _fxstat() and _xstat() uses of the macros. Causes
|
||||
compile and runtime problems.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_XPG4_MULTIBYTE_CHAR],
|
||||
[Platform has support for multi-byte character support compliant
|
||||
with the XPG4 Worldwide Portability Interface wide-character
|
||||
classification.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_AUTO_MMAP_REPLACEMENT],
|
||||
[No system support for replacing any previous mappings.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_AUTO_PTR],
|
||||
[Platform lacks support for the standard C++ auto_ptr class])
|
||||
|
||||
AH_TEMPLATE([ACE_AUTO_PTR_LACKS_RESET],
|
||||
[Compiler/platform standard C++ auto_ptr implementation lacks
|
||||
reset() method])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_READDIR_R],[Platform lacks readdir_r()])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_INLINE_FUNCTIONS],
|
||||
[Platform can't handle "inline" keyword correctly.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_IOSTREAM_TOTALLY],
|
||||
[iostreams are not supported adequately on the given platform.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_NETDB_REENTRANT_FUNCTIONS],
|
||||
[Platform does not support reentrant netdb functions
|
||||
(getprotobyname_r, getprotobynumber_r, gethostbyaddr_r,
|
||||
gethostbyname_r, getservbyname_r).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_REGEX],
|
||||
[Platform supports the POSIX regular expression library])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SEMUN],
|
||||
[Compiler/platform defines a union semun for SysV shared memory ])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SHM_OPEN],[Platform has shm_open()])
|
||||
AH_TEMPLATE([ACE_SHM_OPEN_REQUIRES_ONE_SLASH],[shm_open() requires a leading slash in name])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SIGISMEMBER_BUG],
|
||||
[Platform has bug with sigismember() (HP/UX 11).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SIG_MACROS],
|
||||
[Platform/compiler has macros for sig{empty,fill,add,del}set (e.g.,
|
||||
SCO and FreeBSD)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SIGNAL_OBJECT_AND_WAIT],
|
||||
[Platform supports the Win32 SignalObjectAndWait() function (WinNT
|
||||
4.0 and beyond).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SIG_C_FUNC],
|
||||
[Compiler requires extern "C" functions for signals.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SIZET_SOCKET_LEN],
|
||||
[OS/compiler uses size_t * rather than int * for socket lengths])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SOCKADDR_MSG_NAME],
|
||||
[Platform requires (struct sockaddr *) for msg_name field of
|
||||
struct msghdr.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THR_YIELD],[Platform has thr_yield()])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STANDARD_CPP_LIBRARY],
|
||||
[Platform/compiler supports Standard C++ Library])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STRBUF_T],[Compiler/platform supports struct strbuf])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STREAMS],[Platform supports STREAMS])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STREAM_PIPES],[Platform supports STREAM pipes])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_STROPTS_H],[Platform lacks stropts.h])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STRING_CLASS],
|
||||
[Platform/Compiler supports a String class (e.g., GNU or Win32).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STRINGS],
|
||||
[Platform has <strings.h> (which contains bzero() prototype)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_STRUCT_NETDB_DATA],
|
||||
[Compiler/platform has strange hostent API for socket *_r() calls])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SVR4_DYNAMIC_LINKING],
|
||||
[Compiler/platform supports SVR4 dynamic linking semantics])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SVR4_GETTIMEOFDAY],
|
||||
[Compiler/platform supports SVR4 gettimeofday() prototype but
|
||||
doesn't have a prototype])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SVR4_SIGNAL_T],
|
||||
[Compiler/platform supports SVR4 signal typedef.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SVR4_TLI],
|
||||
[Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SYSINFO],
|
||||
[Platform supports system configuration information.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SYSV_IPC],
|
||||
[Platform supports System V IPC (most versions of UNIX, but not Win32)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SYS_ERRLIST],
|
||||
[Platform/compiler supports _sys_errlist symbol])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SYS_SIGLIST],
|
||||
[Compiler/platform supports _sys_siglist array])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_SYS_XTI_H],[Platform provides <sys/xti.h> header])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TEMPLATE_TYPEDEFS],
|
||||
[Compiler implements templates that support typedefs inside of
|
||||
classes used as formal arguments to a template class.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THREADS],[Platform supports threads.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THREAD_SAFE_ACCEPT],
|
||||
[Platform allows multiple threads to call accept() on the same port
|
||||
(e.g., WinNT).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THREAD_SELF],
|
||||
[Platform has thread_self() rather than pthread_self() (e.g.,
|
||||
DCETHREADS and AIX)])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THREAD_SPECIFIC_STORAGE],
|
||||
[Compiler/platform has thread-specific storage])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THR_C_DEST],
|
||||
[The pthread_keycreate() routine *must* take extern C functions.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_THR_C_FUNC],
|
||||
[The pthread_create() routine *must* take extern C functions.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TIMEZONE_GETTIMEOFDAY],
|
||||
[Platform/compiler supports timezone * as second parameter to
|
||||
gettimeofday() and has a prototype.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TIMOD_H],
|
||||
[Platform supports TLI timod STREAMS module])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TIUSER_H],[Platform supports TLI tiuser header])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TIUSER_H_BROKEN_EXTERN_C],
|
||||
[Platform does not protect <tiuser.h> with extern "C"])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TLI],
|
||||
[Platform supports TLI. Also see ACE_TLI_TCP_DEVICE.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TLI_PROTOTYPES],
|
||||
[Platform provides TLI function prototypes])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_TSS_EMULATION],
|
||||
[ACE provides TSS emulation. See also ACE_DEFAULT_THREAD_KEYS.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_UCONTEXT_T],
|
||||
[Platform supports ucontext_t (which is used in the extended signal API).])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_UNIXWARE_SVR4_SIGNAL_T],
|
||||
[Has inconsistent SVR4 signal stuff, but not the same as the other
|
||||
platforms])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_WCHAR],[Platform/compiler supports wchar_t])
|
||||
AH_TEMPLATE([ACE_USES_WCHAR],[ACE is built to use wide characters internally])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_VERBOSE_NOTSUP],
|
||||
[Prints out console message in ACE_NOTSUP. Useful for tracking down
|
||||
origin of ACE_NOTSUP.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_VOIDPTR_GETTIMEOFDAY],
|
||||
[Platform/compiler supports void * as second parameter to
|
||||
gettimeofday() and has a prototype.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_VOIDPTR_MMAP],[Platform requires void * for mmap().])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_VOIDPTR_SOCKOPT],
|
||||
[OS/compiler uses void * arg 4 setsockopt() rather than const char *])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_XLI],[Platform has the XLI version of TLI])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_XT],[Platform has Xt Intrinsics Toolkit])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_MOTIF],
|
||||
[Platform does not have Motif X toolkit available])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_XTI],
|
||||
[Platform has XTI (X/Open-standardized superset of TLI). Implies
|
||||
ACE_HAS_TLI but uses a different header file.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_ACE_IOSTREAM],
|
||||
[Platform can not build ace/IOStream{,_T}.cpp. This does not
|
||||
necessarily mean that the platform does not support iostreams.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_ACE_CODECS],
|
||||
[Do not compile support for the "Codecs" ACE features.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_ACE_OTHER],
|
||||
[Do not compile support for the "other" ACE features, such as CORBA
|
||||
handling, name services, and QoS.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_ACE_SVCCONF],
|
||||
[Do not compile support for the ACE Service Configurator.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_ACE_TOKEN],
|
||||
[Do not compile support for the ACE Token feature.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_ACE_UUID],
|
||||
[Do not compile support for the ACE UUID feature.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_COND_T],
|
||||
[Platform lacks condition variables (e.g., Win32 and VxWorks)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_COND_TIMEDWAIT_RESET],
|
||||
[pthread_cond_timedwait does *not* reset the time argument when
|
||||
the lock is acquired.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_CONDATTR_PSHARED],
|
||||
[Platform has no implementation of pthread_condattr_setpshared(), even
|
||||
though it supports pthreads!])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_CONST_STRBUF_PTR],
|
||||
[Platform uses struct strbuf * rather than const struct strbuf *
|
||||
(e.g., HP/UX 10.x)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_CONST_TIMESPEC_PTR],
|
||||
[Platform forgot const in cond_timewait (e.g., HP/UX).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_EXEC],
|
||||
[Platform lacks the exec() family of system calls (e.g., Win32,
|
||||
VxWorks, Chorus)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_FILELOCKS],[Platform lacks file locking mechanism])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_GETSERVBYNAME],
|
||||
[Platforms lacks getservbyname() (e.g., VxWorks and Chorus).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_IOSTREAM_FX],
|
||||
[iostream header does not declare ipfx (), opfx (), etc.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_LINEBUFFERED_STREAMBUF],
|
||||
[Platform lacks streambuf "linebuffered ()".])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_LONGLONG_T],
|
||||
[Compiler/platform does not support the unsigned long long datatype.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_U_LONGLONG_T],
|
||||
[Platform does not have u_longlong_t typedef])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_MMAP],
|
||||
[The platform doesn't have mmap(2) (e.g., SCO UNIX).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_MODE_MASKS],
|
||||
[Platform/compiler doesn't have open() mode masks.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_MSG_ACCRIGHTS],
|
||||
[Platform defines ACE_HAS_MSG, but lacks msg_accrights{len}.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_MUTEXATTR_PSHARED],
|
||||
[Platform lacks pthread_mutexattr_setpshared().])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_NULL_PTHREAD_STATUS],
|
||||
[OS requires non-null status pointer for pthread_join ()])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_MUTEX_TIMEOUTS],
|
||||
[Compiler supports timed mutex acquisitions (e.g. pthread_mutex_timedlock()).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_NAMED_POSIX_SEM],
|
||||
[Platform lacks named POSIX semaphores (e.g., Chorus)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_STRPTIME],
|
||||
[Platform lacks native strptime() implementation.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_RLIMIT],
|
||||
[Platform/compiler lacks {get,set}rlimit() function (e.g., VxWorks,
|
||||
Chorus, and SCO UNIX)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_RWLOCKATTR_PSHARED],
|
||||
[Platform lacks pthread_rwlockattr_setpshared().])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_NEW],
|
||||
[Compiler doesn't support placement operator new(size_t, void *).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_DELETE],
|
||||
[Compiler doesn't support placement operator delete(void *, void *).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PRAGMA_ONCE],
|
||||
[Compiler complains about use of obsolete "pragma once"])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PTHREAD_CANCEL],[Platform lacks pthread_cancel()])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PWD_FUNCTIONS],
|
||||
[Platform lacks, getpwnam(), etc.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PWD_REENTRANT_FUNCTIONS],
|
||||
[Platform lacks getpwnam_r() methods (e.g., SGI 6.2).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_RWLOCK_T],[Platform lacks readers/writer locks.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SEMBUF_T],
|
||||
[Platform lacks struct sembuf (e.g., Win32 and VxWorks)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SETDETACH],
|
||||
[Platform lacks pthread_attr_setdetachstate() (e.g., HP/UX 10.x)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SETSCHED],
|
||||
[Platform lacks pthread_attr_setsched() (e.g. MVS)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SIGACTION],
|
||||
[Platform lacks struct sigaction (e.g., Win32 and Chorus)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SIGNED_CHAR],
|
||||
[Platform lacks "signed char" type (broken!)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SIGSET],
|
||||
[Platform lacks signal sets (e.g., Chorus and Win32)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_STRUCT_DIR],
|
||||
[Platform lacks dirent structure.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SYS_MSG_H],
|
||||
[Platform lacks sys/msg.h (e.g., Chorus and VxWorks)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SYSV_MSQ_PROTOS],
|
||||
[Platform lacks SYSV message queue prototypes])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SI_ADDR],
|
||||
[Platform lacks the si_addr field of siginfo_t (e.g., VxWorks and
|
||||
HP/UX 10.x)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SYSV_SHMEM],
|
||||
[Platform lacks System V shared memory (e.g., Win32 and VxWorks)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_SOCKET_BUFSIZ],
|
||||
[Platform doesn't support SO_SNDBUF/SO_RCVBUF (used in TAO)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES],
|
||||
[Compiler doesn't support static data member templates])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_STRRECVFD],[Platform doesn't define struct strrecvfd.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_T_ERRNO],[Header files lack t_errno for TLI])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_TCP_NODELAY],[OS does not support TCP_NODELAY])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_THREAD_PROCESS_SCOPING],
|
||||
[Platform lacks pthread_attr_setscope()])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_TIMESPEC_T],
|
||||
[Platform does not define timepec_t as a typedef for struct timespec.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_STRTOK_R_PROTOTYPE],
|
||||
[Platform/compiler lacks the strtok_r() prototype])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_LSEEK64_PROTOTYPE],
|
||||
[Platform/compiler lacks the lseek64() prototype. This should not
|
||||
be defined if ACE_LACKS_LLSEEK_PROTOTYPE is defined.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_LLSEEK_PROTOTYPE],
|
||||
[Platform/compiler lacks the llseek() prototype. This should not
|
||||
be defined if ACE_LACKS_LSEEK64_PROTOTYPE is defined.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_PREAD_PROTOTYPE],
|
||||
[Platform/compiler lacks the pread() and pwrite() prototypes])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_CHAR_RIGHT_SHIFTS],
|
||||
[Compiler does not have any istream operator>> for chars, u_chars, or
|
||||
signed chars.])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS],
|
||||
[Compiler does not have operator>> (istream &, u_char *) or
|
||||
operator>> (istream &, signed char *)])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_NUMERIC_LIMITS],[Platform lacks std::numeric_limits<>])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_UNIX_DOMAIN_SOCKETS],
|
||||
[ACE platform has no UNIX domain sockets])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_UNIX_SIGNALS],
|
||||
[Platform lacks full signal support (e.g., Win32 and Chorus).])
|
||||
|
||||
AH_TEMPLATE([ACE_LACKS_UTSNAME_T],
|
||||
[Platform lacks struct utsname (e.g., Win32 and VxWorks)])
|
||||
|
||||
AH_TEMPLATE([ACE_MAIN],
|
||||
[Renames "main (int, char *[])", for platforms such as g++/VxWorks
|
||||
that don't allow main. Requires the use of
|
||||
ACE_HAS_NONSTATIC_OBJECT_MANAGER.])
|
||||
|
||||
AH_TEMPLATE([ACE_MT_SAFE],[Compile using multi-thread libraries])
|
||||
|
||||
AH_TEMPLATE([ACE_NDEBUG],[Turns off debugging features])
|
||||
|
||||
AH_TEMPLATE([ACE_NEEDS_DEV_IO_CONVERSION],
|
||||
[Necessary with some compilers to pass ACE_TTY_IO as parameter to
|
||||
DEV_Connector.])
|
||||
|
||||
AH_TEMPLATE([ACE_NEEDS_HUGE_THREAD_STACKSIZE],
|
||||
[Required by platforms with small default stacks.])
|
||||
|
||||
AH_TEMPLATE([ACE_NEEDS_LWP_PRIO_SET],
|
||||
[OS has LWPs, and when the priority of a bound thread is set, then
|
||||
the LWP priority must be set also.])
|
||||
|
||||
AH_TEMPLATE([ACE_NEEDS_SCHED_H],
|
||||
[Platform needs to #include <sched.h> to get thread scheduling defs.])
|
||||
|
||||
AH_TEMPLATE([ACE_NEW_THROWS_EXCEPTIONS],
|
||||
[Compiler's 'new' throws exception on failure (ANSI C++ behavior).])
|
||||
|
||||
AH_TEMPLATE([ACE_NLOGGING],
|
||||
[Turns off the LM_DEBUG and LM_ERROR logging macros...])
|
||||
|
||||
AH_TEMPLATE([ACE_NTRACE],[Turns off the tracing feature.])
|
||||
|
||||
AH_TEMPLATE([ACE_PAGE_SIZE],
|
||||
[Defines the page size of the system (not used on Win32 or with
|
||||
ACE_HAS_GETPAGESIZE).])
|
||||
|
||||
AH_TEMPLATE([ACE_REDEFINES_XTI_FUNCTIONS],
|
||||
[Platform redefines the t_... names (UnixWare)])
|
||||
|
||||
AH_TEMPLATE([ACE_TEMPLATES_REQUIRE_PRAGMA],
|
||||
[Compiler's template mechanism must use a pragma. This is used for
|
||||
AIX's C++ compiler.])
|
||||
|
||||
AH_TEMPLATE([ACE_TEMPLATES_REQUIRE_SOURCE],
|
||||
[Compiler's template mechanim must see source code (i.e., .cpp
|
||||
files). This is used for GNU G++.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_ICMP_SUPPORT],
|
||||
[Defined to 1 if platform supports ICMP over raw sockets])
|
||||
|
||||
AH_TEMPLATE([ACE_NEEDS_FUNC_DEFINITIONS],
|
||||
[Compiler requires a definition for a "hidden" function, e.g., a
|
||||
private, unimplemented copy constructor or assignment operator.
|
||||
The SGI C++ compiler needs this, in template classes, with
|
||||
ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA.])
|
||||
|
||||
AH_TEMPLATE([ACE_TLI_TCP_DEVICE],
|
||||
[Device the platform uses for TCP on TLI. Only needed if not
|
||||
/dev/tcp.])
|
||||
|
||||
AH_TEMPLATE([ACE_USE_POLL],
|
||||
[The OS/platform supports the poll() event demultiplexor])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_EVENT_POLL],[Platform (Linux) supports event poll
|
||||
interface.])
|
||||
|
||||
AH_TEMPLATE([ACE_HAS_DEV_POLL],[Platform supports /dev/poll character
|
||||
device.])
|
||||
|
||||
AH_TEMPLATE([ACE_USES_ASM_SYMBOL_IN_DLSYM],
|
||||
[Platform uses assembly symbols instead of C symbols in dlsym()])
|
||||
|
||||
AH_TEMPLATE([ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB],
|
||||
[Platform has its standard C++ library in the namespace std.])
|
||||
|
||||
dnl DSO/DLL export macros.
|
||||
AH_TEMPLATE([ACE_HAS_CUSTOM_EXPORT_MACROS],
|
||||
[Platform defines custom DSO/DLL symbol export macros.])
|
||||
|
||||
AH_TEMPLATE([ACE_Proper_Export_Flag],
|
||||
[Flag that denotes the symbol should be exported from the DSO/DLL.])
|
||||
|
||||
AH_TEMPLATE([ACE_Proper_Import_Flag],
|
||||
[Flag that denotes the symbol should be imported from the DSO/DLL.])
|
||||
|
||||
dnl ACE_EXPORT_SINGLETON_DECLARATION(T)
|
||||
dnl ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
|
||||
dnl ACE_IMPORT_SINGLETON_DECLARATION(T)
|
||||
dnl ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
|
||||
|
||||
]) dnl End ACE_PREP_CONFIG_HEADER
|
||||
@@ -0,0 +1,156 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <[email protected]>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
#
|
||||
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
# this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
# PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
else
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[$4])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
@@ -0,0 +1,545 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: platform.m4 82266 2008-07-08 16:09:00Z jtc $
|
||||
dnl
|
||||
dnl platform.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains ACE specific M4 macros
|
||||
dnl that set/determine which known platform specific C++ macros
|
||||
dnl to define.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 1998, 1999, 2000, 2002, 2003 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
dnl Check for thread related libraries and compiler flags
|
||||
dnl Usage: ACE_SET_PLATFORM_MACROS
|
||||
AC_DEFUN([ACE_SET_PLATFORM_MACROS],
|
||||
[
|
||||
dnl Begin ACE_SET_PLATFORM_MACROS
|
||||
|
||||
dnl At some point the below platform specific settings should be
|
||||
dnl automated as much as possible! We set things manually just to get
|
||||
dnl things going with the auto{conf,make}/libtool integration into the
|
||||
dnl ACE source tree.
|
||||
|
||||
dnl Platform specific flags
|
||||
case "$host" in
|
||||
*aix3*)
|
||||
AC_DEFINE([AIX])
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
;;
|
||||
*aix4.1*)
|
||||
AC_DEFINE([AIX])
|
||||
dnl Use BSD 4.4 socket definitions for pre-AIX 4.2. The _BSD
|
||||
dnl setting also controls the data type used for waitpid(),
|
||||
dnl wait(), and wait3().
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD=44"
|
||||
dnl pre-AIX 4.3 requires _BSD_INCLUDES
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD_INCLUDES"
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
;;
|
||||
*aix4.2*)
|
||||
AC_DEFINE([AIX])
|
||||
dnl pre-AIX 4.3 requires _BSD_INCLUDES
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD_INCLUDES"
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
AC_DEFINE([ACE_TLI_TCP_DEVICE], ["/dev/xti/tcp"])
|
||||
;;
|
||||
*aix*)
|
||||
AC_DEFINE([AIX])
|
||||
;;
|
||||
dnl /* Cray specific configuration parameters */
|
||||
dnl /*
|
||||
dnl * The following predefined macros are used within ACE ifdefs.
|
||||
dnl * These are defined when using the Cray compilers. _CRAYMPP
|
||||
dnl * is defined, for example, if you are running on a Cray T3E
|
||||
dnl * massively parallel machine. Moreover, in the case of the T3E,
|
||||
dnl * _CRAYT3E will be defined. This is used to determine the
|
||||
dnl * ACE_SIZEOF defines for primitive types.
|
||||
dnl *
|
||||
dnl * _UNICOS is defined as either the major version of UNICOS being run,
|
||||
dnl * e.g. 9 or 10 on the vector machines (e.g. C90, T90, J90, YMP, ...)
|
||||
dnl * or the major+minor+level UNICOS/mk version, e.g. 2.0.3 => 203,
|
||||
dnl * being run on an MPP machine.
|
||||
dnl *
|
||||
dnl * Summary:
|
||||
dnl *
|
||||
dnl * _CRAYMPP (defined only if running on MPP machine, e.g. T3E, UNICOS/mk)
|
||||
dnl * _CRAYT3E (defined specifically if compiling on a Cray T3E)
|
||||
dnl * _UNICOS (defined if running UNICOS or UNICOS/mk)
|
||||
dnl *
|
||||
dnl * Tested on UNICOS 10.0.0.2, UNICOS/mk 2.0.3.10
|
||||
dnl *
|
||||
dnl * Contributed by Doug Anderson <doug "at" clark.net>
|
||||
dnl */
|
||||
t3e-cray-unicosmk*)
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_CRAYMPP -D_CRAYT3E -D_UNICOS"
|
||||
;;
|
||||
t3e-cray*)
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_CRAYT3E -D_UNICOS"
|
||||
;;
|
||||
*cray-unicos*)
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_UNICOS"
|
||||
;;
|
||||
*hpux9*)
|
||||
AC_DEFINE([HPUX])
|
||||
;;
|
||||
*hpux10*)
|
||||
AC_DEFINE([HPUX])
|
||||
AC_DEFINE([HPUX_10])
|
||||
dnl _HPUX_SOURCE : Enable HP-UX specific features in platform headers
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_HPUX_SOURCE"
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
AC_DEFINE([ACE_TLI_TCP_DEVICE], ["/dev/inet_cots"])
|
||||
;;
|
||||
*hpux11*)
|
||||
AC_DEFINE([HPUX])
|
||||
AC_DEFINE([HPUX_11])
|
||||
AC_EGREP_CPP([ACE_ON_64BIT_HP],
|
||||
[
|
||||
#ifdef __LP64__
|
||||
ACE_ON_64BIT_HP
|
||||
#endif
|
||||
],
|
||||
[
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x0000001100000000)])
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDRL], [((char *) 0x0000001100000000)])
|
||||
],
|
||||
[
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
;;
|
||||
*irix5.2*)
|
||||
AC_DEFINE([IRIX5])
|
||||
;;
|
||||
*irix5.3*)
|
||||
AC_DEFINE([IRIX5])
|
||||
if test "$GXX" = no; then
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD_TYPES"
|
||||
fi
|
||||
;;
|
||||
*irix6*)
|
||||
AC_DEFINE([IRIX6])
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) (1024U * 1024 * 1024))])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
dnl _MODERN_C_ : Enable modern features in SGI C++ compiler
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_SGI_MP_SOURCE -D_MODERN_C_"
|
||||
|
||||
case "$host" in
|
||||
*irix6.2*)
|
||||
dnl Recent versions of IRIX do not appear to require this macro.
|
||||
if test "$ace_user_enable_threads" = yes; then
|
||||
AC_DEFINE([ACE_HAS_IRIX62_THREADS])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*linux*)
|
||||
AC_DEFINE([ACE_DEFAULT_MAX_SOCKET_BUFSIZ], [65535])
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
AC_DEFINE([ACE_HAS_BIG_FD_SET]) dnl FIXME: We need a test for this!
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
dnl Does this box have NPTL?
|
||||
NPTL=`getconf GNU_LIBPTHREAD_VERSION | $AWK '{print [$][1]}' -`
|
||||
if test "$NPTL" != NPTL; then
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -DACE_LACKS_LINUX_NPTL"
|
||||
fi
|
||||
;;
|
||||
*lynxos*)
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX_THREADS_CALLS"
|
||||
AC_DEFINE([__NO_INCLUDE_WARN__])
|
||||
AC_DEFINE([ACE_MALLOC_ALIGN], [8])
|
||||
AC_DEFINE([ACE_MAP_PRIVATE], [ACE_MAP_SHARED])
|
||||
AC_DEFINE([ACE_HAS_LYNXOS_SIGNALS])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
;;
|
||||
*mvs*)
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_ALL_SOURCE"
|
||||
;;
|
||||
*osf3.2*)
|
||||
AC_EGREP_CPP([ACE_DEC_CXX],
|
||||
[
|
||||
#if defined(__DECCXX)
|
||||
ACE_DEC_CXX
|
||||
#endif
|
||||
],
|
||||
[
|
||||
AC_DEFINE([DEC_CXX])
|
||||
],)
|
||||
;;
|
||||
*osf4.0*)
|
||||
dnl We need to add checks for g++, DEC C++ and Rational C++
|
||||
AC_EGREP_CPP([ACE_DEC_CXX],
|
||||
[
|
||||
#if defined(__DECCXX)
|
||||
ACE_DEC_CXX
|
||||
#endif
|
||||
],
|
||||
[
|
||||
AC_DEFINE([DEC_CXX])
|
||||
],)
|
||||
dnl Check for _POSIX_C_SOURCE macro
|
||||
AC_EGREP_CPP([ACE_ON_DEC_WITH_POS_SRC],
|
||||
[
|
||||
/* Include unistd.h to define _POSIX_C_SOURCE. */
|
||||
#ifndef ACE_LACKS_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199506L)
|
||||
ACE_ON_DEC_WITH_POS_SRC
|
||||
#endif
|
||||
],
|
||||
[
|
||||
AC_DEFINE([DIGITAL_UNIX])
|
||||
],)
|
||||
AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)])
|
||||
AC_DEFINE([ACE_NEEDS_HUGE_THREAD_STACKSIZE], [(1024 * 1024)])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
;;
|
||||
*sco4.2*)
|
||||
AC_DEFINE([SCO])
|
||||
AC_DEFINE([ACE_DEFAULT_CLOSE_ALL_HANDLES], [0])
|
||||
;;
|
||||
*sco5*)
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_SVID3"
|
||||
AC_DEFINE([SCO])
|
||||
AC_DEFINE([ACE_DEFAULT_CLOSE_ALL_HANDLES], [0])
|
||||
AC_DEFINE([ACE_HAS_BIG_FD_SET]) dnl FIXME: We need a test for this!
|
||||
;;
|
||||
*sunos4*)
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
;;
|
||||
*solaris2.4*)
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET])
|
||||
;;
|
||||
*solaris2.5*)
|
||||
AC_DEFINE([ACE_MALLOC_ALIGN], [8])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET])
|
||||
;;
|
||||
*solaris2.6*)
|
||||
AC_DEFINE([ACE_MALLOC_ALIGN], [8])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET])
|
||||
;;
|
||||
*solaris2.7*)
|
||||
AC_DEFINE([ACE_MALLOC_ALIGN], [8])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET])
|
||||
;;
|
||||
*86*solaris*)
|
||||
AC_DEFINE([ACE_HAS_X86_STAT_MACROS])
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET])
|
||||
;;
|
||||
*tandem*)
|
||||
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
|
||||
;;
|
||||
*unixware2.0*)
|
||||
AC_DEFINE([UNIXWARE])
|
||||
AC_DEFINE([UNIXWARE_2_0])
|
||||
;;
|
||||
*unixware2.1*)
|
||||
AC_DEFINE([UNIXWARE])
|
||||
AC_DEFINE([UNIXWARE_2_1])
|
||||
;;
|
||||
*UnixWare7.1*)
|
||||
AC_DEFINE([UNIXWARE])
|
||||
AC_DEFINE([UNIXWARE_7_1])
|
||||
AC_DEFINE([__IOCTL_VERSIONED__])
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_REENTRANT"
|
||||
;;
|
||||
*vxworks*)
|
||||
AC_DEFINE([VXWORKS])
|
||||
AC_DEFINE([ACE_MAIN], [ace_main])
|
||||
AC_DEFINE([ACE_DEFAULT_MAX_SOCKET_BUFSIZ], [32768])
|
||||
dnl need ACE_HAS_TSS_EMULATION for ACE_DEFAULT_THREAD_KEYS!
|
||||
AC_EGREP_CPP([ACE_TSS_EMULATION],
|
||||
[
|
||||
#if defined (ACE_HAS_TSS_EMULATION)
|
||||
ACE_TSS_EMULATION
|
||||
#endif
|
||||
], [AC_DEFINE([ACE_DEFAULT_THREAD_KEYS], [16])],[])
|
||||
AC_DEFINE([ACE_THR_PRI_FIFO_DEF], [101])
|
||||
;;
|
||||
*cygwin32*)
|
||||
AC_DEFINE([CYGWIN32])
|
||||
;;
|
||||
*mingw32*)
|
||||
AC_DEFINE([ACE_WIN32])
|
||||
;;
|
||||
*win32*)
|
||||
AC_DEFINE([ACE_WIN32])
|
||||
dnl AC_DEFINE(ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL)
|
||||
if test "$ace_u_long_long_typedef_set" != yes; then
|
||||
ACE_UINT64="unsigned __int64"
|
||||
ace_u_long_long_typedef_set=yes
|
||||
fi dnl "$ace_u_long_long_typedef_set" != yes
|
||||
;;
|
||||
*qnx* | *nto* | *neutrino*)
|
||||
dnl These should be defined on the command line, not in config.h.
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_QNX_SOURCE -D_POSIX_C_SOURCE=199506"
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX_NAME_MAX=14" # Max bytes in a
|
||||
# filename
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX_PATH_MAX=256" # Num. bytes in
|
||||
# pathname (excl. NULL)
|
||||
case "$host" in
|
||||
i[[3456]]86*)
|
||||
if test "$GXX" = yes; then
|
||||
# Neutrino defines memcpy as a macro on x86, which then
|
||||
# hoses the ACE_OS::memcpy() method. Undefining
|
||||
# __OPTIMIZE__ prevents this from happening.
|
||||
ACE_CPPFLAGS="$ACE_CPPFLAGS -U__OPTIMIZE__"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
ACE_FUNC_IOCTL_ARGTYPES
|
||||
ACE_CHECK_GETNAME_RETURNS_RANDOM_SIN_ZERO
|
||||
ACE_CHECK_HAS_NONCONST_FD_ISSET
|
||||
ACE_CHECK_FORMAT_SPECIFIERS
|
||||
ACE_CHECK_LACKS_PERFECT_MULTICAST_FILTERING
|
||||
ACE_CHECK_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE
|
||||
|
||||
dnl End ACE_SET_PLATFORM_MACROS
|
||||
])
|
||||
|
||||
|
||||
|
||||
# ACE_CHECK_FORMAT_SPECIFIERS
|
||||
#
|
||||
# Override default *printf format specifiers for size_t, ssize_t, ACE_INT64,
|
||||
# and ACE_UINT64
|
||||
#
|
||||
# FIXME: Is it possible to write a portable feature test, or is checking
|
||||
# the the target OS / target CPU the best we can do?
|
||||
#
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_FORMAT_SPECIFIERS],
|
||||
[dnl
|
||||
AH_TEMPLATE([ACE_SIZE_T_FORMAT_SPECIFIER],
|
||||
[Define to the *printf format specifier (e.g. "%u") for size_t])dnl
|
||||
AH_TEMPLATE([ACE_SSIZE_T_FORMAT_SPECIFIER],
|
||||
[Define to the *printf format specifier (e.g. "%d") for ssize_t])dnl
|
||||
AH_TEMPLATE([ACE_INT64_FORMAT_SPECIFIER],
|
||||
[Define to the *printf format specifier (e.g. "%lld") for ACE_INT64])dnl
|
||||
AH_TEMPLATE([ACE_UINT64_FORMAT_SPECIFIER],
|
||||
[Define to the *printf format specifier (e.g. "%llu") for ACE_UINT64])dnl
|
||||
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
AC_DEFINE([ACE_SIZE_T_FORMAT_SPECIFIER], ["%lu"])
|
||||
;;
|
||||
|
||||
linux*)
|
||||
case "$host_cpu" in
|
||||
alpha|ia64|x86_64)
|
||||
AC_DEFINE([ACE_SIZE_T_FORMAT_SPECIFIER], ["%lu"])
|
||||
AC_DEFINE([ACE_SSIZE_T_FORMAT_SPECIFIER], ["%ld"])
|
||||
AC_DEFINE([ACE_INT64_FORMAT_SPECIFIER], ["%ld"])
|
||||
AC_DEFINE([ACE_UINT64_FORMAT_SPECIFIER], ["%lu"])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
mingw32*)
|
||||
AC_DEFINE([ACE_INT64_FORMAT_SPECIFIER], ["%I64d"])
|
||||
AC_DEFINE([ACE_UINT64_FORMAT_SPECIFIER], ["%I64u"])
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
AC_DEFINE([ACE_SIZE_T_FORMAT_SPECIFIER], ["%lu"])
|
||||
AC_DEFINE([ACE_SSIZE_T_FORMAT_SPECIFIER], ["%ld"])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
win32*)
|
||||
AC_DEFINE([ACE_INT64_FORMAT_SPECIFIER], ["%I64d"])
|
||||
AC_DEFINE([ACE_UINT64_FORMAT_SPECIFIER], ["%I64u"])
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac])
|
||||
|
||||
|
||||
# ACE_CHECK_PERFECT_MULTICAST_FILTERING
|
||||
#
|
||||
# Checks whether platform lacks "perfect" multicast filtering.
|
||||
#
|
||||
# FIXME: Is it possible to write a portable feature test, or is checking
|
||||
# the the target OS the best we can do?
|
||||
#
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_LACKS_PERFECT_MULTICAST_FILTERING],
|
||||
[AC_CACHE_CHECK([whether platform lacks perfect multicast filtering],
|
||||
[ace_cv_lacks_perfect_multicast_filtering],
|
||||
[case "$host_os" in
|
||||
darwin* | freebsd* | netbsd* | openbsd* | qnx*)
|
||||
ace_cv_lacks_perfect_multicast_filtering=yes ;;
|
||||
*)
|
||||
ace_cv_lacks_perfect_multicast_filtering=no ;;
|
||||
esac])
|
||||
|
||||
if test $ace_cv_lacks_perfect_multicast_filtering = yes; then
|
||||
AC_DEFINE([ACE_LACKS_PERFECT_MULTICAST_FILTERING], 1,
|
||||
[Define to 1 if platform lacks IGMPv3 "perfect" filtering of multicast
|
||||
datagrams at the socket level. If defined, ACE_SOCK_Dgram_Mcast will bind
|
||||
the first joined multicast group to the socket, and all future joins on that
|
||||
socket will fail with an error.])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# ACE_FUNC_IOCTL_ARGTYPES
|
||||
#
|
||||
# Determine the correct type to be passed to ioctl's second argument and
|
||||
# define the types in ACE_IOCTL_TYPE_ARG2.
|
||||
#
|
||||
# FIXME: Should we support ioctl's third argument as well...?
|
||||
#
|
||||
# FIXME: Is it possible to write a portable feature test, or is checking
|
||||
# the the target OS the best we can do?
|
||||
#
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_FUNC_IOCTL_ARGTYPES],
|
||||
[AC_CACHE_CHECK([types of arguments for ioctl()],
|
||||
[ace_cv_func_ioctl_arg2],
|
||||
[case "$host_os" in
|
||||
darwin* | freebsd* | netbsd* | openbsd*)
|
||||
ace_cv_func_ioctl_arg2="unsigned long" ;;
|
||||
*)
|
||||
ace_cv_func_ioctl_arg2="int" ;;
|
||||
esac])
|
||||
|
||||
AC_DEFINE_UNQUOTED(ACE_IOCTL_TYPE_ARG2, $ace_cv_func_ioctl_arg2,
|
||||
[Define to the type of arg 2 for `ioctl'.])
|
||||
])
|
||||
|
||||
|
||||
# ACE_VAR_TIMEZONE
|
||||
#
|
||||
# Checks whether platform has global "timezone" variable.
|
||||
#
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_VAR_TIMEZONE],
|
||||
[AC_CACHE_CHECK([for timezone variable],
|
||||
[ace_cv_var_timezone],
|
||||
[AC_TRY_LINK([#include <time.h>],
|
||||
[return (int) timezone(0, 0);],
|
||||
[ace_cv_var_timezone=no],
|
||||
[AC_TRY_LINK([#include <time.h>],
|
||||
[return (int) timezone;],
|
||||
[ace_cv_var_timezone=yes],
|
||||
[ace_cv_var_timezone=no])])
|
||||
])
|
||||
if test "$ace_cv_var_timezone" = yes; then
|
||||
AC_DEFINE([ACE_HAS_TIMEZONE], 1,
|
||||
[Define to 1 if platform has global timezone variable])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# ACE_CHECK_GETNAME_RETURNS_RANDOM_SIN_ZERO
|
||||
#
|
||||
# Checks whether getsockname() and getpeername() return random values
|
||||
# in the sockaddr_in.sin_zero field.
|
||||
#
|
||||
# FIXME: Is it possible to write a portable feature test, or is checking
|
||||
# the the target OS the best we can do?
|
||||
#
|
||||
AC_DEFUN([ACE_CHECK_GETNAME_RETURNS_RANDOM_SIN_ZERO],
|
||||
[AC_CACHE_CHECK([whether getsockname() and getpeername() return random values in sockaddr_in.sin_zero],
|
||||
[ace_cv_getname_returns_random_sin_zero],
|
||||
[case "$host_os" in
|
||||
linux*)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <linux/version.h>],
|
||||
[
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47))
|
||||
int ok;
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
])
|
||||
],
|
||||
[ace_cv_getname_returns_random_sin_zero=no],
|
||||
[ace_cv_getname_returns_random_sin_zero=yes])
|
||||
;;
|
||||
*)
|
||||
ace_cv_getname_returns_random_sin_zero=no
|
||||
;;
|
||||
esac])
|
||||
|
||||
if test $ace_cv_getname_returns_random_sin_zero = yes; then
|
||||
AC_DEFINE([ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO], 1,
|
||||
[Define to 1 if the getsockname() and getpeername() return random values in the sockaddr_in.sin_zero field.])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# ACE_CHECK_HAS_NONCONST_FD_ISSET
|
||||
#
|
||||
# Checks if system has a nonconst FD_ISSET macro.
|
||||
#
|
||||
#---------------------------------------------------------------------------
|
||||
AC_DEFUN([ACE_CHECK_HAS_NONCONST_FD_ISSET],
|
||||
[dnl
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <sys/time.h>],
|
||||
[
|
||||
//const fd_set* temp = new fd_set();
|
||||
//FD_ISSET(0, const_cast< fd_set* >( temp ) );
|
||||
const fd_set* temp = new fd_set();
|
||||
FD_ISSET(0, temp );
|
||||
])
|
||||
],[],[AC_DEFINE([ACE_HAS_NONCONST_FD_ISSET], 1,
|
||||
[Define to 1 if system has nonconst FD_ISSET() macro.])]
|
||||
)
|
||||
])
|
||||
|
||||
# ACE_CHECK_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE
|
||||
#
|
||||
# Checks whether the dlsym() call segfaults when passed an invalid handle.
|
||||
#
|
||||
# FIXME: Is it possible to write a portable feature test, or is checking
|
||||
# the the target OS the best we can do?
|
||||
#
|
||||
AC_DEFUN([ACE_CHECK_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE],
|
||||
[AC_CACHE_CHECK([whether dlsym() segfaults when passed an invalid handle],
|
||||
[ace_cv_has_dlsym_segfault_on_invalid_handle],
|
||||
[case "$host_os" in
|
||||
linux* | openbsd*)
|
||||
ace_cv_has_dlsym_segfault_on_invalid_handle=yes ;;
|
||||
*)
|
||||
ace_cv_has_dlsym_segfault_on_invalid_handle=no;;
|
||||
esac])
|
||||
|
||||
if test $ace_cv_has_dlsym_segfault_on_invalid_handle = yes; then
|
||||
AC_DEFINE([ACE_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE], 1,
|
||||
[Define to 1 if the dlsym() call segfaults when passed an invalid handle.])
|
||||
fi
|
||||
])
|
||||
@@ -0,0 +1,770 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: subsets.m4 80826 2008-03-04 14:51:23Z wotte $
|
||||
dnl
|
||||
dnl subsets.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains ACE specific M4 macros
|
||||
dnl that set/determine which ACE subsets to build.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 1998, 1999, 2001 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
dnl Check for thread related libraries and compiler flags
|
||||
dnl Usage: ACE_CHECK_SUBSETS
|
||||
AC_DEFUN([ACE_CHECK_SUBSETS],
|
||||
[
|
||||
dnl Begin ACE_CHECK_SUBSETS
|
||||
|
||||
dnl Assume all subsets will be built, including the full ACE library.
|
||||
dnl If any of the components is explicitly enabled or disabled by the user
|
||||
dnl then do NOT build the full ACE library.
|
||||
AC_ARG_ENABLE([lib-all],
|
||||
AS_HELP_STRING([--enable-lib-all],[build all ACE components [[no]]]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ace_user_enable_lib_all=yes
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_all=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-all])
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[
|
||||
ace_user_enable_lib_all=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([lib-full],
|
||||
AS_HELP_STRING([--enable-lib-full],[build the full ACE library [[yes]]]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ace_user_enable_lib_full=yes
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_full=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-full])
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[
|
||||
ace_user_enable_lib_full=yes
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([lib-os],
|
||||
AS_HELP_STRING([--enable-lib-os],[build ACE_OS library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_OS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_os=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-os])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-codecs],
|
||||
AS_HELP_STRING([--enable-lib-codecs],[build ACE_Codecs library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_CODECS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_codecs=no
|
||||
AC_DEFINE([ACE_LACKS_ACE_CODECS])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-codecs])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-connection],
|
||||
AS_HELP_STRING([--enable-lib-connection],[build ACE_Connection library ]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_CONNECTION
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_connection=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-connection])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-demux],
|
||||
AS_HELP_STRING([--enable-lib-demux],[build ACE_Demux library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_DEMUX
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_demux=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-demux])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-filecache],
|
||||
AS_HELP_STRING([--enable-lib-filecache],[build ACE_Filecache library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_FILECACHE
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_filecache=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-filecache])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-ipc],
|
||||
AS_HELP_STRING([--enable-lib-ipc],[build ACE_IPC library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_IPC
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_ipc=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-ipc])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-logging],
|
||||
AS_HELP_STRING([--enable-lib-logging],[build ACE_Logging library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_LOGGING
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_logging=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-logging])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-memory],
|
||||
AS_HELP_STRING([--enable-lib-memory],[build ACE_Memory library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_MEMORY
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_memory=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-memory])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-metrics],
|
||||
AS_HELP_STRING([--enable-lib-metrics],[build ACE_Metrics library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_METRICS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_metrics=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-metrics])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-sockets],
|
||||
AS_HELP_STRING([--enable-lib-sockets],[build ACE_Sockets library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_SOCKETS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_sockets=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-sockets])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-streams],
|
||||
AS_HELP_STRING([--enable-lib-streams],[build ACE_Streams library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_STREAMS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_streams=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-streams])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-svcconf],
|
||||
AS_HELP_STRING([--enable-lib-svcconf],[build ACE_Svcconf library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_SVCCONF
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_svcconf=no
|
||||
AC_DEFINE([ACE_LACKS_ACE_SVCCONF])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-svcconf])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-threads],
|
||||
AS_HELP_STRING([--enable-lib-threads],[build ACE_Threads library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_threads=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-threads])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-timer],
|
||||
AS_HELP_STRING([--enable-lib-timer],[build ACE_Timer library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_TIMER
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_timer=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-timer])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-token],
|
||||
AS_HELP_STRING([--enable-lib-token],[build ACE_Token library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_TOKEN
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_token=no
|
||||
AC_DEFINE([ACE_LACKS_ACE_TOKEN])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-token])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-utils],
|
||||
AS_HELP_STRING([--enable-lib-utils],[build ACE_Utils library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_UTILS
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_utils=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-utils])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-uuid],
|
||||
AS_HELP_STRING([--enable-lib-uuid],[build ACE_UUID library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_UUID
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_uuid=no
|
||||
AC_DEFINE([ACE_LACKS_ACE_UUID])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-uuid])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
AC_ARG_ENABLE([lib-other],
|
||||
AS_HELP_STRING([--enable-lib-other],[build ACE_Other library]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes)
|
||||
ACE_CREATE_LIBACE_OTHER
|
||||
;;
|
||||
no)
|
||||
ace_user_enable_lib_other=no
|
||||
AC_DEFINE([ACE_LACKS_ACE_OTHER])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value ${enableval} for --enable-lib-other])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Disable full ACE library build
|
||||
ace_user_enable_lib_full=no
|
||||
],)
|
||||
|
||||
|
||||
dnl If no ACE subsets were explicitly enabled or disabled then build
|
||||
dnl all of them.
|
||||
if test $ace_user_enable_lib_all = yes; then
|
||||
|
||||
ACE_CREATE_ALL_COMPONENTS
|
||||
|
||||
elif test $ace_user_enable_lib_all = no; then
|
||||
|
||||
ACE_DISABLE_ALL_COMPONENTS
|
||||
|
||||
fi
|
||||
|
||||
if test $ace_user_enable_lib_full = no &&
|
||||
test $ace_user_enable_lib_os = no &&
|
||||
test $ace_user_enable_lib_codecs = no &&
|
||||
test $ace_user_enable_lib_connection = no &&
|
||||
test $ace_user_enable_lib_demux = no &&
|
||||
test $ace_user_enable_lib_filecache = no &&
|
||||
test $ace_user_enable_lib_ipc = no &&
|
||||
test $ace_user_enable_lib_logging = no &&
|
||||
test $ace_user_enable_lib_memory = no &&
|
||||
test $ace_user_enable_lib_metrics = no &&
|
||||
test $ace_user_enable_lib_threads = no &&
|
||||
test $ace_user_enable_lib_sockets = no &&
|
||||
test $ace_user_enable_lib_svcconf = no &&
|
||||
test $ace_user_enable_lib_streams = no &&
|
||||
test $ace_user_enable_lib_timer = no &&
|
||||
test $ace_user_enable_lib_token = no &&
|
||||
test $ace_user_enable_lib_utils = no &&
|
||||
test $ace_user_enable_lib_uuid = no &&
|
||||
test $ace_user_enable_lib_other = no; then
|
||||
|
||||
dnl If we get here then no ACE libraries will be built!
|
||||
AC_MSG_ERROR([No ACE components will be built. Specify which components to build.])
|
||||
|
||||
fi dnl No components will be built!
|
||||
|
||||
dnl Set which ACE subsets to build
|
||||
AM_CONDITIONAL(BUILD_OS_FILES,
|
||||
test X$ace_user_enable_lib_os = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_CODECS_FILES,
|
||||
test X$ace_user_enable_lib_codecs = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_CONNECTION_FILES,
|
||||
test X$ace_user_enable_lib_connection = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_DEMUX_FILES,
|
||||
test X$ace_user_enable_lib_demux = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_FILECACHE_FILES,
|
||||
test X$ace_user_enable_lib_filecache = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_IPC_FILES,
|
||||
test X$ace_user_enable_lib_ipc = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_LOGGING_FILES,
|
||||
test X$ace_user_enable_lib_logging = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_MEMORY_FILES,
|
||||
test X$ace_user_enable_lib_memory = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_METRICS_FILES,
|
||||
test X$ace_user_enable_lib_metrics = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_SOCKETS_FILES,
|
||||
test X$ace_user_enable_lib_sockets = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_STREAMS_FILES,
|
||||
test X$ace_user_enable_lib_streams = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_SVCCONF_FILES,
|
||||
test X$ace_user_enable_lib_svcconf = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_THREADS_FILES,
|
||||
test X$ace_user_enable_lib_threads = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_TIMER_FILES,
|
||||
test X$ace_user_enable_lib_timer = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_TOKEN_FILES,
|
||||
test X$ace_user_enable_lib_token = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_UTILS_FILES,
|
||||
test X$ace_user_enable_lib_utils = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_UUID_FILES,
|
||||
test X$ace_user_enable_lib_uuid = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_OTHER_FILES,
|
||||
test X$ace_user_enable_lib_other = Xyes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_FULL_LIBRARY,
|
||||
test X$ace_user_enable_lib_full = Xyes)
|
||||
|
||||
dnl End ACE_CHECK_SUBSETS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_OS library
|
||||
dnl Usage: ACE_CREATE_LIBACE_OS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_OS],
|
||||
[
|
||||
ace_user_enable_lib_os=yes
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Utils library
|
||||
dnl Usage: ACE_CREATE_LIBACE_UTILS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_UTILS],
|
||||
[
|
||||
ace_user_enable_lib_utils=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_UUID library
|
||||
dnl Usage: ACE_CREATE_LIBACE_UUID
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_UUID],
|
||||
[
|
||||
ace_user_enable_lib_uuid=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Filecache library
|
||||
dnl Usage: ACE_CREATE_LIBACE_FILECACHE
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_FILECACHE],
|
||||
[
|
||||
ace_user_enable_lib_filecache=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Logging library
|
||||
dnl Usage: ACE_CREATE_LIBACE_LOGGING
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_LOGGING],
|
||||
[
|
||||
ace_user_enable_lib_logging=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Metrics library
|
||||
dnl Usage: ACE_CREATE_LIBACE_METRICS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_METRICS],
|
||||
[
|
||||
ace_user_enable_lib_metrics=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Threads library
|
||||
dnl Usage: ACE_CREATE_LIBACE_THREADS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_THREADS],
|
||||
[
|
||||
ace_user_enable_lib_threads=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Demux library
|
||||
dnl Usage: ACE_CREATE_LIBACE_DEMUX
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_DEMUX],
|
||||
[
|
||||
ace_user_enable_lib_demux=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Connection library
|
||||
dnl Usage: ACE_CREATE_LIBACE_CONNECTION
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_CONNECTION],
|
||||
[
|
||||
ace_user_enable_lib_connection=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
ACE_CREATE_LIBACE_DEMUX
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Sockets library
|
||||
dnl Usage: ACE_CREATE_LIBACE_SOCKETS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_SOCKETS],
|
||||
[
|
||||
ace_user_enable_lib_sockets=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_IPC library
|
||||
dnl Usage: ACE_CREATE_LIBACE_IPC
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_IPC],
|
||||
[
|
||||
ace_user_enable_lib_ipc=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_SOCKETS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Svcconf library
|
||||
dnl Usage: ACE_CREATE_LIBACE_SVCCONF
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_SVCCONF],
|
||||
[
|
||||
ace_user_enable_lib_svcconf=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
ACE_CREATE_LIBACE_DEMUX
|
||||
ACE_CREATE_LIBACE_SOCKETS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Streams library
|
||||
dnl Usage: ACE_CREATE_LIBACE_STREAMS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_STREAMS],
|
||||
[
|
||||
ace_user_enable_lib_streams=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
ACE_CREATE_LIBACE_DEMUX
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Memory library
|
||||
dnl Usage: ACE_CREATE_LIBACE_MEMORY
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_MEMORY],
|
||||
[
|
||||
ace_user_enable_lib_memory=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Timer library
|
||||
dnl Usage: ACE_CREATE_LIBACE_TIMER
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_TIMER],
|
||||
[
|
||||
ace_user_enable_lib_timer=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Token library
|
||||
dnl Usage: ACE_CREATE_LIBACE_TOKEN
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_TOKEN],
|
||||
[
|
||||
ace_user_enable_lib_token=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_UTILS
|
||||
ACE_CREATE_LIBACE_LOGGING
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
ACE_CREATE_LIBACE_DEMUX
|
||||
ACE_CREATE_LIBACE_CONNECTION
|
||||
ACE_CREATE_LIBACE_SOCKETS
|
||||
ACE_CREATE_LIBACE_IPC
|
||||
ACE_CREATE_LIBACE_SVCCONF
|
||||
ACE_CREATE_LIBACE_STREAMS
|
||||
ACE_CREATE_LIBACE_MEMORY
|
||||
dnl ACE_CREATE_LIBACE_OTHER
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Codecs library
|
||||
dnl Usage: ACE_CREATE_LIBACE_CODECS
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_CODECS],
|
||||
[
|
||||
ace_user_enable_lib_codecs=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
])
|
||||
|
||||
dnl Set the component dependencies for the libACE_Other library
|
||||
dnl Usage: ACE_CREATE_LIBACE_OTHER
|
||||
AC_DEFUN([ACE_CREATE_LIBACE_OTHER],
|
||||
[
|
||||
ace_user_enable_lib_other=yes
|
||||
|
||||
dnl Be careful not to go into a circular/recursive loop with these macros!
|
||||
ACE_CREATE_LIBACE_OS
|
||||
ACE_CREATE_LIBACE_UTILS
|
||||
ACE_CREATE_LIBACE_LOGGING
|
||||
ACE_CREATE_LIBACE_THREADS
|
||||
ACE_CREATE_LIBACE_DEMUX
|
||||
ACE_CREATE_LIBACE_CONNECTION
|
||||
ACE_CREATE_LIBACE_SOCKETS
|
||||
ACE_CREATE_LIBACE_IPC
|
||||
ACE_CREATE_LIBACE_SVCCONF
|
||||
ACE_CREATE_LIBACE_STREAMS
|
||||
ACE_CREATE_LIBACE_MEMORY
|
||||
dnl ACE_CREATE_LIBACE_TOKEN
|
||||
])
|
||||
|
||||
dnl Build all ACE component libraries
|
||||
dnl Usage: ACE_CREATE_ALL_COMPONENTS
|
||||
AC_DEFUN([ACE_CREATE_ALL_COMPONENTS],
|
||||
[
|
||||
ace_user_enable_lib_os=yes
|
||||
ace_user_enable_lib_codecs=yes
|
||||
ace_user_enable_lib_connection=yes
|
||||
ace_user_enable_lib_demux=yes
|
||||
ace_user_enable_lib_filecache=yes
|
||||
ace_user_enable_lib_ipc=yes
|
||||
ace_user_enable_lib_logging=yes
|
||||
ace_user_enable_lib_memory=yes
|
||||
ace_user_enable_lib_metrics=yes
|
||||
ace_user_enable_lib_sockets=yes
|
||||
ace_user_enable_lib_streams=yes
|
||||
ace_user_enable_lib_svcconf=yes
|
||||
ace_user_enable_lib_threads=yes
|
||||
ace_user_enable_lib_timer=yes
|
||||
ace_user_enable_lib_token=yes
|
||||
ace_user_enable_lib_utils=yes
|
||||
ace_user_enable_lib_uuid=yes
|
||||
ace_user_enable_lib_other=yes
|
||||
])
|
||||
|
||||
dnl Disable all ACE component libraries
|
||||
dnl Usage: ACE_CREATE_ALL_COMPONENTS
|
||||
AC_DEFUN([ACE_DISABLE_ALL_COMPONENTS],
|
||||
[
|
||||
ace_user_enable_lib_os=no
|
||||
ace_user_enable_lib_codecs=no
|
||||
ace_user_enable_lib_connection=no
|
||||
ace_user_enable_lib_demux=no
|
||||
ace_user_enable_lib_filecache=no
|
||||
ace_user_enable_lib_ipc=no
|
||||
ace_user_enable_lib_logging=no
|
||||
ace_user_enable_lib_memory=no
|
||||
ace_user_enable_lib_metrics=no
|
||||
ace_user_enable_lib_sockets=no
|
||||
ace_user_enable_lib_streams=no
|
||||
ace_user_enable_lib_svcconf=no
|
||||
ace_user_enable_lib_threads=no
|
||||
ace_user_enable_lib_timer=no
|
||||
ace_user_enable_lib_token=no
|
||||
ace_user_enable_lib_utils=no
|
||||
ace_user_enable_lib_uuid=no
|
||||
ace_user_enable_lib_other=no
|
||||
])
|
||||
@@ -0,0 +1,334 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: threads.m4 80826 2008-03-04 14:51:23Z wotte $
|
||||
dnl
|
||||
dnl threads.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains ACE specific M4 macros
|
||||
dnl for configuring thread support. This file is to be used
|
||||
dnl with the configure script.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 1998, 1999, 2002 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
dnl Make sure thread library exists
|
||||
dnl We need to be careful when tests for other thread libraries are
|
||||
dnl added that we don't screw up handling of "ace_user_enable_threads"
|
||||
dnl Tests should probably be more platform specific later on.
|
||||
|
||||
dnl Check for thread related libraries and compiler flags
|
||||
dnl Usage: ACE_CHECK_THREADS
|
||||
AC_DEFUN([ACE_CHECK_THREADS],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CXX])
|
||||
dnl AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
dnl AC_LANG([C++])
|
||||
dnl AC_REQUIRE([AC_LANG])
|
||||
|
||||
dnl Check if compiler accepts specific flag to enable threads
|
||||
ACE_CACHE_CHECK([if compiler may need a command line thread flag],
|
||||
[ace_cv_feature_may_need_thread_flag],
|
||||
[
|
||||
ace_save_CXXFLAGS="$CXXFLAGS"
|
||||
|
||||
ACE_CHECK_THREAD_FLAGS(
|
||||
[
|
||||
ace_cv_feature_may_need_thread_flag=no
|
||||
],
|
||||
[
|
||||
ace_cv_feature_may_need_thread_flag=yes
|
||||
])
|
||||
dnl Reset the flags to a consistent state.
|
||||
dnl This prevents duplicate flags from being added to
|
||||
dnl the C/CXXFLAGS variable.
|
||||
CXXFLAGS="$ace_save_CXXFLAGS"
|
||||
],
|
||||
[
|
||||
dnl The compiler/platform has no thread support linked in by default
|
||||
dnl so search for a usable compiler flag to enable thread support.
|
||||
dnl If no thread flag is found then the remaining tests should still
|
||||
dnl figure out how to enable thread support via library checks.
|
||||
ACE_SEARCH_THREAD_FLAGS(
|
||||
[mt pthread pthreads mthreads threads Kthread kthread -thread_safe],,)
|
||||
dnl NOTE: "-thread_safe" is correct, not "thread_safe."
|
||||
dnl KAI C++ uses the flag "--thread_safe" which is why
|
||||
dnl "-thread_safe" is passed as the flag to test.
|
||||
],
|
||||
[
|
||||
dnl Do nothing
|
||||
])
|
||||
|
||||
dnl Check for UNIX International Threads (ACE calls this STHREADS)
|
||||
dnl This used to check for thr_create(), but AIX has a semi-functional
|
||||
dnl UI Threads capability that includes thr_create(). We don't want to
|
||||
dnl find such a half-hearted UI Threads, so this was changed to look for
|
||||
dnl a UI Threads function that AIX doesn't offer.
|
||||
AS_IF([test "$ace_user_enable_uithreads" = yes],
|
||||
[ AC_MSG_CHECKING([for UNIX International threads capability])
|
||||
AC_SEARCH_LIBS([mutex_lock], [thread],
|
||||
[
|
||||
ace_has_sthreads=yes
|
||||
AC_DEFINE([ACE_HAS_STHREADS], 1,
|
||||
[Define to 1 if platform has UNIX International Threads])
|
||||
],
|
||||
[
|
||||
ace_has_sthreads=no
|
||||
])
|
||||
dnl Sometimes thr_create is actually found with explicitly linking against
|
||||
dnl -lthread, so try a more "exotic" function.
|
||||
AC_SEARCH_LIBS([rwlock_destroy], [thread],[],[])
|
||||
AC_MSG_RESULT([$ace_has_sthreads])
|
||||
],[])
|
||||
|
||||
dnl Check if any thread related preprocessor flags are needed.
|
||||
ACE_CHECK_THREAD_CPPFLAGS
|
||||
|
||||
dnl Check for POSIX threads
|
||||
ace_has_pthreads=no
|
||||
AS_IF([test "$ace_user_enable_pthreads" = yes],
|
||||
[ AC_MSG_CHECKING([for POSIX threads library])
|
||||
ACE_CHECK_POSIX_THREADS(
|
||||
[
|
||||
ace_has_pthreads=yes
|
||||
AC_DEFINE([ACE_HAS_PTHREADS], 1,
|
||||
[Define to 1 if platform has POSIX threads])
|
||||
AC_MSG_RESULT([none required])
|
||||
],
|
||||
[])
|
||||
|
||||
AS_IF([test "$ace_has_pthreads" != yes],
|
||||
[
|
||||
ace_posix_threads_search_LIBS="$LIBS"
|
||||
for ace_p in pthread pthreads c_r gthreads; do
|
||||
LIBS="-l$ace_p $ace_posix_threads_search_LIBS"
|
||||
ACE_CHECK_POSIX_THREADS(
|
||||
[
|
||||
ace_has_pthreads=yes
|
||||
AC_DEFINE([ACE_HAS_PTHREADS])
|
||||
AC_MSG_RESULT([-l$ace_p])
|
||||
break
|
||||
],
|
||||
[])
|
||||
done
|
||||
|
||||
AS_IF([test "$ace_has_pthreads" != yes],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS="$ace_posix_threads_search_LIBS"
|
||||
],[])
|
||||
],
|
||||
[])
|
||||
],
|
||||
[
|
||||
AC_MSG_NOTICE([Pthreads disabled by user; not checking for it])
|
||||
])
|
||||
|
||||
dnl If we don't have any thread library, then disable threading altogether!
|
||||
AS_IF([test "$ace_has_pthreads" != yes && test "$ace_has_sthreads" != yes],
|
||||
[
|
||||
ace_user_enable_threads=no
|
||||
])
|
||||
])
|
||||
|
||||
dnl This macro will check that the current compiler flags do something
|
||||
dnl useful in terms of thread libraries and/or functions.
|
||||
dnl Usage: ACE_CHECK_THREAD_FLAGS(ACTION-IF-USABLE [, ACTION-IF-NOT-USABLE]])
|
||||
AC_DEFUN([ACE_CHECK_THREAD_FLAGS],
|
||||
[
|
||||
ACE_CONVERT_WARNINGS_TO_ERRORS([
|
||||
dnl Check for UI thread support first.
|
||||
|
||||
dnl Because some platforms are brain damaged enough to provide
|
||||
dnl useless thread function stubs, link tests may succeed despite the
|
||||
dnl fact the stubs are no-ops. This forces us to use a run-time test
|
||||
dnl to get around this nuisance by checking the return value of
|
||||
dnl thr_create(). The cross-compiled case will use a link-time
|
||||
dnl test, instead.
|
||||
dnl Furthermore, we need the implementation to be a real one, not
|
||||
dnl a half-hearted attempt such as that provided on AIX 5. So, we
|
||||
dnl make sure it can at least work with a mutex.
|
||||
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <thread.h>
|
||||
#if ((THR_BOUND & THR_SUSPEND & THR_DETACHED) != 0)
|
||||
# error This is a silly UI Threads implementation.
|
||||
#endif
|
||||
|
||||
extern "C" void *
|
||||
ace_start_func (void *)
|
||||
{
|
||||
mutex_t m;
|
||||
mutex_init (&m, USYNC_THREAD, NULL);
|
||||
mutex_lock (&m);
|
||||
mutex_unlock (&m);
|
||||
mutex_destroy (&m);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
thread_t tid = 0;
|
||||
|
||||
return thr_create (0, 0, ace_start_func, 0, 0, &tid);
|
||||
}
|
||||
]])],
|
||||
[$1],
|
||||
[
|
||||
dnl Now check for POSIX thread support.
|
||||
ACE_CHECK_POSIX_THREADS([$1],[$2])
|
||||
|
||||
],
|
||||
[
|
||||
dnl UI threads cross-compiled case
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <thread.h>
|
||||
|
||||
extern "C" void *
|
||||
ace_start_func (void *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
]],
|
||||
[[
|
||||
thread_t tid = 0;
|
||||
|
||||
(void) thr_create (&tid, 0, ace_start_func, 0);
|
||||
]])],
|
||||
[$1],
|
||||
[$2])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl Check what compiler thread flag may be used, if any, from the given list.
|
||||
dnl The flag list is separated by white space.
|
||||
dnl Usage: ACE_SEARCH_THREAD_FLAGS(THREAD-FLAG-LIST,
|
||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
AC_DEFUN([ACE_SEARCH_THREAD_FLAGS],
|
||||
[
|
||||
AC_LANG([C++])
|
||||
AC_REQUIRE([AC_LANG])
|
||||
|
||||
ACE_CACHE_CHECK([for compiler thread flag],
|
||||
[ace_cv_thread_flag_search],
|
||||
[
|
||||
ace_save_CXXFLAGS="$CXXFLAGS"
|
||||
|
||||
for i in $1; do
|
||||
CXXFLAGS="$CXXFLAGS -$i"
|
||||
|
||||
ACE_CHECK_THREAD_FLAGS(
|
||||
[
|
||||
ace_cv_thread_flag_search="-$i"
|
||||
|
||||
dnl A usable flag was found so break out of the loop.
|
||||
break;
|
||||
],
|
||||
[
|
||||
ace_cv_thread_flag_search=no
|
||||
])
|
||||
|
||||
dnl Reset the flags for the next flag check.
|
||||
CXXFLAGS="$ace_save_CXXFLAGS"
|
||||
done
|
||||
|
||||
dnl Reset the flags to a consistent state.
|
||||
dnl This prevents duplicate flags from being added to
|
||||
dnl the CCXXFLAGS variable.
|
||||
CXXFLAGS="$ace_save_CXXFLAGS"
|
||||
],
|
||||
[
|
||||
dnl Add the found/cached thread flag to the C/CXXFLAGS variables
|
||||
CXXFLAGS="$CXXFLAGS $ace_cv_thread_flag_search"
|
||||
|
||||
$2
|
||||
],
|
||||
[
|
||||
$3
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl Check if the compiler defines thread related preprocessor flags.
|
||||
dnl If not, then provide them.
|
||||
dnl Usage: ACE_CHECK_THREAD_CPPFLAGS
|
||||
AC_DEFUN([ACE_CHECK_THREAD_CPPFLAGS],
|
||||
[
|
||||
dnl A compile-time test is used instead of a preprocesse-time test
|
||||
dnl because compiler thread flags defined in CFLAGS or CXXFLAGS
|
||||
dnl should be used for this test.
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if !defined (_REENTRANT) && !defined (_THREAD_SAFE)
|
||||
#error Neither _REENTRANT nor _THREAD_SAFE were defined.
|
||||
THROW ME AN ERROR!
|
||||
#endif
|
||||
]], [[
|
||||
int a = 0; a++;
|
||||
]])],[
|
||||
ACE_THR_CPPFLAGS=
|
||||
],[
|
||||
ACE_THR_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE"
|
||||
])
|
||||
])
|
||||
|
||||
dnl Check for POSIX threads support.
|
||||
dnl Usage: ACE_CHECK_POSIX_THREADS([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
AC_DEFUN([ACE_CHECK_POSIX_THREADS],
|
||||
[
|
||||
dnl Because some platforms are brain damaged enough to provide
|
||||
dnl useless thread function stubs, link tests may succeed despite the
|
||||
dnl fact the stubs are no-ops. This forces us to use a run-time test
|
||||
dnl to get around this nuisance by checking the return value of
|
||||
dnl pthread_create(). The cross-compiled case will use a link-time
|
||||
dnl test, instead.
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <pthread.h>
|
||||
|
||||
extern "C" void *
|
||||
ace_start_func (void *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
pthread_t tid = 0;
|
||||
|
||||
return pthread_create (&tid, 0, ace_start_func, 0);
|
||||
}
|
||||
]])],
|
||||
[$1],
|
||||
[$2],
|
||||
[
|
||||
dnl POSIX threads check -- cross-compiled case
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <pthread.h>
|
||||
|
||||
extern "C" void *
|
||||
ace_start_func (void *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
]],
|
||||
[[
|
||||
pthread_t tid = 0;
|
||||
|
||||
(void) pthread_create (&tid, 0, ace_start_func, 0);
|
||||
]])],
|
||||
[$1],
|
||||
[$2])
|
||||
])
|
||||
])
|
||||
@@ -0,0 +1,220 @@
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl $Id: tls.m4 80826 2008-03-04 14:51:23Z wotte $
|
||||
dnl
|
||||
dnl tls.m4
|
||||
dnl
|
||||
dnl ACE M4 include file which contains ACE specific M4 macros
|
||||
dnl that determine availablility of SSL/TLS support.
|
||||
dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Copyright (C) 2003 Ossama Othman
|
||||
dnl
|
||||
dnl All Rights Reserved
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the current ACE distribution terms.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
dnl TLS/SSL library IO check
|
||||
dnl Use this macro to determine if TLS/SSL support is available on the
|
||||
dnl current host.
|
||||
dnl Usage: ACE_CHECK_TLS
|
||||
AC_DEFUN([ACE_CHECK_TLS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_LANG([C++])
|
||||
AC_REQUIRE([AC_LANG])
|
||||
|
||||
ace_TLS_CPPFLAGS=""
|
||||
ace_TLS_LDFLAGS=""
|
||||
|
||||
AC_ARG_WITH([openssl],
|
||||
AS_HELP_STRING([--with-openssl@<:@=DIR@:>@],
|
||||
[root directory of openssl installation]),
|
||||
[
|
||||
ace_with_openssl="${withval}"
|
||||
if test "${ace_with_openssl}" != yes; then
|
||||
ace_openssl_include="${ace_with_openssl}/include"
|
||||
ace_openssl_libdir="${ace_with_openssl}/lib"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_ARG_WITH([openssl_include],
|
||||
AS_HELP_STRING([--with-openssl-include=DIR],
|
||||
[specify exact include dir for openssl headers]),
|
||||
[ace_openssl_include="$withval"])
|
||||
|
||||
AC_ARG_WITH([openssl_libdir],
|
||||
AS_HELP_STRING([--with-openssl-libdir=DIR],
|
||||
[specify exact include dir for openssl libraries]),
|
||||
[ace_openssl_libdir="$withval"])
|
||||
|
||||
if test "${ace_openssl_include}"; then
|
||||
ace_TLS_CPPFLAGS="-I${ace_openssl_include}"
|
||||
fi
|
||||
|
||||
if test "${ace_openssl_libdir}"; then
|
||||
ace_TLS_LDFLAGS="-L${ace_openssl_libdir}"
|
||||
fi
|
||||
|
||||
dnl Save the current library and preprocessor flagslist. We do not
|
||||
dnl want to add the SSL/TLS-specific ones to the general library link
|
||||
dnl and preprocessor flags list since they should only be used when
|
||||
dnl building the ACE_SSL library and/or binaries that use the ACE_SSL
|
||||
dnl library.
|
||||
ace_save_LIBS="$LIBS"
|
||||
ace_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $ace_TLS_CPPFLAGS"
|
||||
ace_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $ace_TLS_LDFLAGS"
|
||||
|
||||
dnl ---------------------------------------------------------
|
||||
|
||||
dnl Check if OpenSSL requires the Kerberos include directory to be
|
||||
dnl added to the header search path.
|
||||
|
||||
AC_CACHE_CHECK([for Kerberos include flags needed by OpenSSL],
|
||||
[ac_cv_kerberos_dir],
|
||||
[
|
||||
dnl Try compiling without any Kerberos-specific flags first.
|
||||
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([
|
||||
#include <openssl/ssl.h>
|
||||
],
|
||||
[
|
||||
// ... THIS CODE DOES NOTHING! IT IS JUST USED FOR COMPILE TESTS ...
|
||||
|
||||
// ... Perform TCP connection ...
|
||||
|
||||
// ... Perform TLS/SSL stuff ...
|
||||
CRYPTO_set_locking_callback (0);
|
||||
SSLeay_add_ssl_algorithms ();
|
||||
SSL_load_error_strings ();
|
||||
SSL_METHOD * meth = TLSv1_method ();
|
||||
SSL_CTX * ctx = SSL_CTX_new (meth);
|
||||
SSL * ssl = SSL_new (ctx);
|
||||
int fd = 2000; // Dummy file descriptor value.
|
||||
SSL_set_fd (ssl, fd);
|
||||
SSL_connect (ssl);
|
||||
SSL_shutdown (ssl);
|
||||
|
||||
// ...
|
||||
])
|
||||
],
|
||||
[
|
||||
ac_cv_kerberos_dir=no
|
||||
],
|
||||
[
|
||||
ace_kerberos_dir=""
|
||||
for ace_kerberos in /usr /usr/local; do
|
||||
ace_kerberos_dir="${ace_kerberos}/kerberos/include"
|
||||
ace_kerberos_CPPFLAGS="-I${ace_kerberos_dir}"
|
||||
|
||||
CPPFLAGS="$ace_save_CPPFLAGS $ace_TLS_CPPFLAGS $ace_kerberos_CPPFLAGS"
|
||||
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([
|
||||
#include <openssl/ssl.h>
|
||||
],
|
||||
[
|
||||
// ... THIS CODE DOES NOTHING! IT IS JUST USED FOR COMPILE TESTS ...
|
||||
|
||||
// ... Perform TCP connection ...
|
||||
|
||||
// ... Perform TLS/SSL stuff ...
|
||||
CRYPTO_set_locking_callback (0);
|
||||
SSLeay_add_ssl_algorithms ();
|
||||
SSL_load_error_strings ();
|
||||
SSL_METHOD * meth = TLSv1_method ();
|
||||
SSL_CTX * ctx = SSL_CTX_new (meth);
|
||||
SSL * ssl = SSL_new (ctx);
|
||||
int fd = 2000; // Dummy file descriptor value.
|
||||
SSL_set_fd (ssl, fd);
|
||||
SSL_connect (ssl);
|
||||
SSL_shutdown (ssl);
|
||||
|
||||
// ...
|
||||
])
|
||||
],
|
||||
[
|
||||
ac_cv_kerberos_dir="$ace_kerberos_dir"
|
||||
break
|
||||
],
|
||||
[
|
||||
ac_cv_kerberos_dir=no
|
||||
])
|
||||
done
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test "$ac_cv_kerberos_dir" = no],
|
||||
[
|
||||
AC_SUBST([ACE_KERBEROS_INCLUDES],[.])
|
||||
],
|
||||
[
|
||||
ace_TLS_CPPFLAGS="$ace_TLS_CPPFLAGS -I${ac_cv_kerberos_dir}"
|
||||
AC_SUBST([ACE_KERBEROS_INCLUDES],[$ac_cv_kerberos_dir])
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------
|
||||
|
||||
dnl Add the TLS/SSL libraries to the library list.
|
||||
ace_TLS_LIBS="-lssl -lcrypto"
|
||||
|
||||
LIBS="$ace_TLS_LIBS $LIBS"
|
||||
LDFLAGS="$ace_TLS_LDFLAGS $LDFLAGS"
|
||||
|
||||
AC_CACHE_CHECK([for OpenSSL libraries],
|
||||
[ac_cv_openssl_libs],
|
||||
[
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([
|
||||
#include <openssl/ssl.h>
|
||||
],
|
||||
[
|
||||
// ... THIS PROGRAM DOES NOTHING! IT IS JUST USED FOR LINK TESTS ...
|
||||
|
||||
// ... Perform TCP connection ...
|
||||
|
||||
// ... Perform TLS/SSL stuff ...
|
||||
CRYPTO_set_locking_callback (0);
|
||||
SSLeay_add_ssl_algorithms ();
|
||||
SSL_load_error_strings ();
|
||||
SSL_METHOD * meth = TLSv1_method ();
|
||||
SSL_CTX * ctx = SSL_CTX_new (meth);
|
||||
SSL * ssl = SSL_new (ctx);
|
||||
int fd = 2000; // Dummy file descriptor value.
|
||||
SSL_set_fd (ssl, fd);
|
||||
SSL_connect (ssl);
|
||||
SSL_shutdown (ssl);
|
||||
|
||||
// ...
|
||||
])
|
||||
],
|
||||
[
|
||||
ac_cv_openssl_libs=yes
|
||||
],
|
||||
[
|
||||
ac_cv_openssl_libs=no
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test $ac_cv_openssl_libs != no],
|
||||
[
|
||||
AC_SUBST([ACE_TLS_CPPFLAGS],[$ace_TLS_CPPFLAGS])
|
||||
AC_SUBST([ACE_TLS_LDFLAGS],[$ace_TLS_LDFLAGS])
|
||||
AC_SUBST([ACE_TLS_LIBS],[$ace_TLS_LIBS])
|
||||
],
|
||||
[])
|
||||
|
||||
dnl Restore the original library list and preprocessor flags.
|
||||
LIBS="$ace_save_LIBS"
|
||||
CPPFLAGS="$ace_save_CPPFLAGS"
|
||||
LDFLAGS="$ace_save_LDFLAGS"
|
||||
])
|
||||
Reference in New Issue
Block a user