Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/config/ax_check_export_capability.m4 @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
1 # @synopsis AX_CHECK_EXPORT_CAPABILITY | |
2 # | |
3 # Does the compiler support the exporting of library symbols? | |
4 # @version 1.0 Jan 31 2009 | |
5 # @author Steve Underwood | |
6 # | |
7 # Permission to use, copy, modify, distribute, and sell this file for any | |
8 # purpose is hereby granted without fee, provided that the above copyright | |
9 # and this permission notice appear in all copies. No representations are | |
10 # made about the suitability of this software for any purpose. It is | |
11 # provided "as is" without express or implied warranty. | |
12 | |
13 AC_DEFUN([AX_CHECK_EXPORT_CAPABILITY], | |
14 [AC_CACHE_CHECK([if $1 supports library symbol export], | |
15 ac_cv_symbol_export_capability, | |
16 | |
17 [# Initialize to unknown | |
18 ac_cv_symbol_export_capability="no" | |
19 | |
20 case "${ax_cv_c_compiler_vendor}" in | |
21 gnu) | |
22 save_CFLAGS="${CFLAGS}" | |
23 CFLAGS="${CFLAGS} -fvisibility=hidden" | |
24 AC_COMPILE_IFELSE( | |
25 [AC_LANG_PROGRAM( | |
26 [int foo __attribute__ ((visibility("default")));], | |
27 [;] | |
28 )], | |
29 | |
30 [AC_MSG_RESULT([yes]) | |
31 COMP_VENDOR_CFLAGS="-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CFLAGS" | |
32 COMP_VENDOR_CXXFLAGS="-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CXXFLAGS" | |
33 ac_cv_symbol_export_capability="yes"], | |
34 | |
35 [AC_MSG_RESULT([no])] | |
36 ) | |
37 CFLAGS="${save_CFLAGS}" | |
38 ;; | |
39 | |
40 sun) | |
41 save_CFLAGS="${CFLAGS}" | |
42 CFLAGS="${CFLAGS} -xldscope=hidden" | |
43 AC_COMPILE_IFELSE( | |
44 [AC_LANG_PROGRAM( | |
45 [int foo __attribute__ ((visibility("default")));], | |
46 [;] | |
47 )], | |
48 | |
49 [AC_MSG_RESULT([yes]) | |
50 COMP_VENDOR_CFLAGS="-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CFLAGS" | |
51 COMP_VENDOR_CXXFLAGS="-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CXXFLAGS" | |
52 ac_cv_symbol_export_capability="yes"], | |
53 | |
54 [AC_MSG_RESULT([no])] | |
55 ) | |
56 CFLAGS="${save_CFLAGS}" | |
57 ;; | |
58 | |
59 esac]) | |
60 AS_IF([test AS_VAR_GET(ac_cv_symbol_export_capability) = yes], [$2], [$3])[]dnl | |
61 ]) # AX_CHECK_EXPORT_CAPABILITY |