show what letters do what for the button order
[dana/obconf.git] / m4 / exportdynamic.m4
1 dnl Check how to export all functions, which is needed for libglade to set up
2 dnl the event handlers.
3 AC_DEFUN([CHECK_EXPORT_DYNAMIC],
4 [
5   AC_MSG_CHECKING(for extra flags needed to export symbols)
6   case $host_os in
7     aix4*|aix5*)
8       EXPORT_DYNAMIC_FLAGS="-Wl,-bexpall,-brtl"
9       ;;
10     bsdi*)
11       EXPORT_DYNAMIC_FLAGS="-rdynamic"
12       ;;
13     *)
14       save_ldflags="$LDFLAGS"
15       LDFLAGS=-Wl,-export-dynamic
16       AC_TRY_LINK(,,[EXPORT_DYNAMIC_FLAGS="-Wl,-export-dynamic"],
17         [
18           LDFLAGS=-Wl,-Bexport
19           AC_TRY_LINK(,,[EXPORT_DYNAMIC_FLAGS="- Wl,-Bexport"],
20                       AC_MSG_RESULT(none))
21         ]
22       )
23       LDFLAGS="$save_ldflags"
24       ;;
25   esac
26   AC_SUBST(EXPORT_DYNAMIC_FLAGS)
27   test "x$EXPORT_DYNAMIC_FLAGS" != x && AC_MSG_RESULT([$EXPORT_DYNAMIC_FLAGS])
28 ])