forked from Mirrors/flatpak-builder
Search for dwarf.h in configure
Add a --with-dwarf-header argument for supplying the path containing the dwarf.h header from libdwarf. Either a path must be provided, or a fallback location of $includedir/libdwarf will be tested. https://bugs.freedesktop.org/show_bug.cgi?id=94308tingping/wmclass
parent
87be89a7b8
commit
12d49beb72
20
configure.ac
20
configure.ac
|
@ -206,6 +206,26 @@ AS_IF([ test $have_libelf = maybe ], [
|
|||
if test x$have_libelf != xyes; then
|
||||
AC_MSG_ERROR([libelf not found])
|
||||
fi
|
||||
|
||||
dnl This only checks for the header, not the library.
|
||||
AC_ARG_WITH([dwarf-header],
|
||||
[AS_HELP_STRING([--with-dwarf-header],
|
||||
[path containing dwarf.h])],
|
||||
[AS_IF([test "x$with_dwarf_header" = "xno"],
|
||||
[AC_MSG_WARN([either a path containing dwarf.h must be
|
||||
provided, or it will be searched for in includedir])])],
|
||||
[with_dwarf_header=yes])
|
||||
|
||||
AS_IF([test "x$with_dwarf_header" = "xyes"],
|
||||
[CPPFLAGS="$CPPFLAGS -I$(eval echo \"$includedir\")/libdwarf"
|
||||
AC_CHECK_HEADER([dwarf.h])
|
||||
AS_IF([test "x$ac_cv_header_dwarf_h" != "xyes"],
|
||||
[AC_MSG_ERROR([dwarf.h is required but was not found; locate it using --with-dwarf-header=/path/containing/header])])],
|
||||
[CPPFLAGS="$CPPFLAGS -I$with_dwarf_header"
|
||||
AC_CHECK_HEADER([dwarf.h])
|
||||
AS_IF([test "x$ac_cv_header_dwarf_h" != "xyes"],
|
||||
[AC_MSG_ERROR([dwarf.h is required but was not found])])])
|
||||
|
||||
AC_ARG_ENABLE(documentation,
|
||||
AC_HELP_STRING([--enable-documentation], [Build documentation]),,
|
||||
enable_documentation=yes)
|
||||
|
|
Loading…
Reference in New Issue