aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 21 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index a16d96f..11e5147 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,28 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
[ AC_MSG_RESULT([no])
CFLAGS="$saved_CFLAGS" ])
-dnl check for -fvisibility=hidden compiler support (GCC >= 4)
+dnl check for -ffunction-sections compiler support
saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fvisibility=hidden"
-AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
+CFLAGS="$CFLAGS -ffunction-sections"
+AC_MSG_CHECKING([if ${CC} supports -ffunctions-sections])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
+ [ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_RESULT([no])
+ CFLAGS="$saved_CFLAGS" ])
+
+dnl check for -fdata-sections compiler support
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fdata-sections"
+AC_MSG_CHECKING([if ${CC} supports -fdata-sections])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
+ [ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_RESULT([no])
+ CFLAGS="$saved_CFLAGS" ])
+
+dnl check for -flto compiler support
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -flto"
+AC_MSG_CHECKING([if ${CC} supports -flto])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
[ AC_MSG_RESULT([yes]) ],
[ AC_MSG_RESULT([no])