File: api-exports.m4

package info (click to toggle)
rtfilter 1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 500 kB
  • sloc: ansic: 2,671; makefile: 246; sh: 83; python: 57
file content (26 lines) | stat: -rw-r--r-- 938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

AC_DEFUN([AC_DEF_API_EXPORT_ATTRS],
[AC_REQUIRE([gl_VISIBILITY])
AC_REQUIRE([AC_CANONICAL_HOST])
case $host in
	*win32* | *mingw* | *cygwin* | *windows*)
		os_support=win32
		;;
	*)
		os_support=other
		;;
esac
if test $HAVE_VISIBILITY = 1 -a $os_support !=  "win32"; then
     AC_DEFINE(LOCAL_FN, [__attribute__ ((visibility ("hidden")))],
     	[attribute of the non-exported symbols])
     AC_DEFINE(API_EXPORTED, [__attribute__ ((visibility ("default")))],
     	[attribute of the symbols exported in the API])
     AC_DEFINE(DEPRECATED, [__attribute__ ((deprecated))],
        [attribute of the deprecated symbols exported in the API])
else
     AC_DEFINE(LOCAL_FN, [], [attribute of the non-exported symbols])
     AC_DEFINE(API_EXPORTED, [__declspec(dllexport)], [attribute of the symbols exported in the API])
     AC_DEFINE(DEPRECATED, [__declspec(deprecated)], [attribute of the deprecated symbols exported in the API])
fi
])