have_libdwarf=no
AS_IF([test "x${ac_cv_header_libdwarf_dwarf_h}" = xyes], [have_libdwarf=yes])
AS_IF([test "x${ac_cv_header_dwarf_h}" = xyes], [have_libdwarf=yes])
-if test "x${follytestmain}" = "xyes"; then
- AS_IF([test "x${have_libdwarf}" = xno], [AC_MSG_ERROR([Please install libdwarf development library and headers])])
- AC_CHECK_HEADERS([elf.h],, AC_MSG_ERROR([Please install libelf development package]))
- AC_CHECK_HEADERS([libunwind.h],, AC_MSG_ERROR([Please install libunwind development package]))
-else
- AS_IF([test "x${have_libdwarf}" = xno],, [use_follytestmain=no])
- AC_CHECK_HEADERS([elf.h],, [use_follytestmain=no])
- AC_CHECK_HEADERS([libunwind.h],, [use_follytestmain=no])
-fi
+
AC_ARG_ENABLE([mobile],
AS_HELP_STRING([--enable-mobile],
AM_CONDITIONAL([HAVE_EXTRANDOM_SFMT19937],
[test "$folly_cv_prog_cc_have_extrandom_sfmt19937" = "yes"])
AM_CONDITIONAL([FOLLY_TESTMAIN], [test "x${use_follytestmain}" = "xyes"])
+AM_CONDITIONAL([HAVE_LIBDWARF], [test "x${have_libdwarf}" = "xyes"])
AM_CONDITIONAL([HAVE_BOOST_CONTEXT], [test "x${ax_cv_boost_context}" = "xyes"])
# remove pkg-config deps from dependent libraries
lib_LTLIBRARIES = libfollyinit.la
+if HAVE_LIBDWARF
+FOLLY_SYMBOLIZER=$(top_builddir)/experimental/symbolizer/libfollysymbolizer.la
+endif
+
libfollyinit_la_SOURCES = Init.cpp
-libfollyinit_la_LIBADD = $(top_builddir)/libfolly.la $(top_builddir)/experimental/symbolizer/libfollysymbolizer.la
+libfollyinit_la_LIBADD = $(top_builddir)/libfolly.la $(FOLLY_SYMBOLIZER)
libfollyinit_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)