Test for libelf.h in subdirectory libelf, too, and inlude it from there if test

was positive.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1093 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2012-07-18 12:42:47 +00:00
parent d486a0a1cd
commit a8b5742512
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-07-18 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* configure.ac: check for libelf.h also in libelf/
* fileio.c: include <libelf/libelf.h> if configure found this
to be the case
2012-06-13 Rene Liebscher <R.Liebscher@gmx.de>
* configure.ac: Check for presence of <pthread.h>

View File

@ -84,7 +84,7 @@ if test x$have_libelf = xyes; then
;;
esac
AC_DEFINE([HAVE_LIBELF])
AC_CHECK_HEADERS([libelf.h])
AC_CHECK_HEADERS([libelf.h libelf/libelf.h])
fi
AC_SUBST(LIBELF, $LIBELF)

View File

@ -30,7 +30,11 @@
#include <stdint.h>
#ifdef HAVE_LIBELF
#ifdef HAVE_LIBELF_H
#include <libelf.h>
#elif defined(HAVE_LIBELF_LIBELF_H)
#include <libelf/libelf.h>
#endif
#define EM_AVR32 0x18ad /* inofficial */
#endif