]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
2005-11-16 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Thu, 17 Nov 2005 02:32:03 +0000 (02:32 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 17 Nov 2005 02:32:03 +0000 (02:32 +0000)
* configure.ac: Define HAVE_LIBASM and STANDALONE conditionals.
In config.h, define ELFUTILS_HEADER macro.

tests/
2005-11-16  Roland McGrath  <roland@redhat.com>

* configure.ac: New file, for standalone build/dist of test suite.
* Makefile.am [!STANDALONE] (INCLUDES): Don't define it.
(asm_TESTS): New variable, broken out of ...
(TESTS): ... here.  Also remove msg_tst.
[!STANDALONE] (TESTS, noinst_PROGRAMS): Add in $(asm_TESTS), msg_tst.
(installed_TESTS_ENVIRONMENT): New variable.
[STANDALONE] (TESTS_ENVIRONMENT): Use that.
[!STANDALONE] (installcheck-local): Likewise.
[STANDALONE] (libdw, libelf, libasm, libebl): Define using -lfoo.
* addrscopes.c: Include <config.h>.
Use ELFUTILS_HEADER macro in #include of installed elfutils/ headers.
* allfcts.c: Likewise.
* asm-tst1.c: Likewise.
* asm-tst2.c: Likewise.
* asm-tst3.c: Likewise.
* asm-tst4.c: Likewise.
* asm-tst5.c: Likewise.
* asm-tst6.c: Likewise.
* asm-tst7.c: Likewise.
* asm-tst8.c: Likewise.
* asm-tst9.c: Likewise.
* dwflmodtest.c: Likewise.
* find-prologues.c: Likewise.
* funcscopes.c: Likewise.
* get-aranges.c: Likewise.
* get-files.c: Likewise.
* get-lines.c: Likewise.
* get-pubnames.c: Likewise.
* line2addr.c: Likewise.
* newscn.c: Likewise.
* show-abbrev.c: Likewise.
* show-die-info.c: Likewise.
* update3.c: Likewise.
* update4.c: Likewise.

* dwflmodtest.c (print_instance): Don't use INTUSE.
(options): Don't use N_ macro.

29 files changed:
ChangeLog
configure.ac
tests/ChangeLog
tests/Makefile.am
tests/addrscopes.c
tests/allfcts.c
tests/asm-tst1.c
tests/asm-tst2.c
tests/asm-tst3.c
tests/asm-tst4.c
tests/asm-tst5.c
tests/asm-tst6.c
tests/asm-tst7.c
tests/asm-tst8.c
tests/asm-tst9.c
tests/configure.ac [new file with mode: 0644]
tests/dwflmodtest.c
tests/find-prologues.c
tests/funcscopes.c
tests/get-aranges.c
tests/get-files.c
tests/get-lines.c
tests/get-pubnames.c
tests/line2addr.c
tests/newscn.c
tests/show-abbrev.c
tests/show-die-info.c
tests/update3.c
tests/update4.c

index ff169d67db743f5ed0b24d046dac970400c4a579..ae80f975e471eb2d619cecf5f942722d39d6b35c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-16  Roland McGrath  <roland@redhat.com>
+
+       * configure.ac: Define HAVE_LIBASM and STANDALONE conditionals.
+       In config.h, define ELFUTILS_HEADER macro.
+
 2005-11-15  Roland McGrath  <roland@redhat.com>
 
        * configure.ac: Add --enable-tests-rpath option.
index 3d30a031ca37fabf7625d222187b5312cb3b6fa2..53e33ea2ef12fe0664686e1afc672046ba125983 100644 (file)
@@ -191,12 +191,14 @@ dnl CPU handling library.
 AC_CONFIG_FILES([libcpu/Makefile])
 
 dnl Assembler library.
+AM_CONDITIONAL(HAVE_LIBASM, true)dnl Used in tests/Makefile.am, which see.
 AC_CONFIG_FILES([libasm/Makefile])
 
 dnl Tools.
 AC_CONFIG_FILES([src/Makefile po/Makefile.in])
 
 dnl Test suite.
+AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see.
 AC_CONFIG_FILES([tests/Makefile])
 
 # Get the definitions necessary to create the Makefiles in the po
@@ -299,6 +301,9 @@ AH_BOTTOM([
 # define INTDEF(name) /* empty */
 # define INTDECL(name) /* empty */
 #endif
+
+/* This macro is used by the tests conditionalize for standalone building.  */
+#define ELFUTILS_HEADER(name) <lib##name.h>
 ])
 
 AC_OUTPUT
index 6243ff42633fe1f57da56c7b307f6c85385d2ef7..e74b639c9d06fc491aaa76f05d9bbb933b6b8dd4 100644 (file)
@@ -1,3 +1,43 @@
+2005-11-16  Roland McGrath  <roland@redhat.com>
+
+       * configure.ac: New file, for standalone build/dist of test suite.
+       * Makefile.am [!STANDALONE] (INCLUDES): Don't define it.
+       (asm_TESTS): New variable, broken out of ...
+       (TESTS): ... here.  Also remove msg_tst.
+       [!STANDALONE] (TESTS, noinst_PROGRAMS): Add in $(asm_TESTS), msg_tst.
+       (installed_TESTS_ENVIRONMENT): New variable.
+       [STANDALONE] (TESTS_ENVIRONMENT): Use that.
+       [!STANDALONE] (installcheck-local): Likewise.
+       [STANDALONE] (libdw, libelf, libasm, libebl): Define using -lfoo.
+       * addrscopes.c: Include <config.h>.
+       Use ELFUTILS_HEADER macro in #include of installed elfutils/ headers.
+       * allfcts.c: Likewise.
+       * asm-tst1.c: Likewise.
+       * asm-tst2.c: Likewise.
+       * asm-tst3.c: Likewise.
+       * asm-tst4.c: Likewise.
+       * asm-tst5.c: Likewise.
+       * asm-tst6.c: Likewise.
+       * asm-tst7.c: Likewise.
+       * asm-tst8.c: Likewise.
+       * asm-tst9.c: Likewise.
+       * dwflmodtest.c: Likewise.
+       * find-prologues.c: Likewise.
+       * funcscopes.c: Likewise.
+       * get-aranges.c: Likewise.
+       * get-files.c: Likewise.
+       * get-lines.c: Likewise.
+       * get-pubnames.c: Likewise.
+       * line2addr.c: Likewise.
+       * newscn.c: Likewise.
+       * show-abbrev.c: Likewise.
+       * show-die-info.c: Likewise.
+       * update3.c: Likewise.
+       * update4.c: Likewise.
+
+       * dwflmodtest.c (print_instance): Don't use INTUSE.
+       (options): Don't use N_ macro.
+
 2005-11-15  Roland McGrath  <roland@redhat.com>
 
        * Makefile.am (BUILD_RPATH): New variable.
index 0a80f63438d61254d8c4d7d6a0a1bcb554260cca..98e6f035344e910f2cdb237efce7b988488cefe7 100644 (file)
@@ -22,10 +22,13 @@ AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
            $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
 BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
 endif
+
+if !STANDALONE
 INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
           -I$(top_srcdir)/libdwfl \
           -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
           -I$(top_srcdir)/lib -I..
+endif !STANDALONE
 
 if TESTS_RPATH
 AM_LDFLAGS = -Wl,-rpath,$(BUILT_RPATH)
@@ -38,18 +41,17 @@ noinst_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
                  showptable update1 update2 update3 update4 test-nlist \
                  show-die-info get-files get-lines get-pubnames \
                  get-aranges allfcts line2addr addrscopes funcscopes \
-                 show-abbrev hash asm-tst1 asm-tst2 asm-tst3 \
-                 asm-tst4 asm-tst5 asm-tst6 asm-tst7 asm-tst8 asm-tst9 \
-                 msg_tst newscn ecp dwflmodtest find-prologues
+                 show-abbrev hash newscn ecp dwflmodtest find-prologues
 # get-ciefde
+asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
+           asm-tst6 asm-tst7 asm-tst8 asm-tst9
 
 TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
        update1 update2 update3 update4 \
        run-show-die-info.sh run-get-files.sh run-get-lines.sh \
        run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
-       run-show-abbrev.sh run-line2addr.sh hash asm-tst1 asm-tst2 \
-       asm-tst3 asm-tst4 asm-tst5 asm-tst6 asm-tst7 asm-tst8 asm-tst9 \
-       msg_tst newscn run-strip-test.sh run-strip-test2.sh \
+       run-show-abbrev.sh run-line2addr.sh hash \
+       newscn run-strip-test.sh run-strip-test2.sh \
        run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
        run-strip-test6.sh run-ecp-test.sh run-ecp-test2.sh \
        run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
@@ -58,6 +60,17 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
        run-find-prologues.sh
 # run-show-ciefde.sh
 
+if !STANDALONE
+noinst_PROGRAMS += msg_tst
+TESTS += msg_tst
+endif
+
+if HAVE_LIBASM
+noinst_PROGRAMS += $(asm_TESTS)
+TESTS += $(asm_TESTS)
+endif
+
+
 EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             run-show-die-info.sh run-get-files.sh run-get-lines.sh \
             run-get-pubnames.sh run-get-aranges.sh \
@@ -82,20 +95,31 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
             coverage.sh test-subr.sh test-wrapper.sh
 
+installed_TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
+                             installed $(tests_rpath) \
+                             $(program_transform_name)
+if STANDALONE
+TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+else !STANDALONE
 TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
                    ../libdw:../libebl:../libelf:../libasm
 
 installcheck-local:
-       $(MAKE) $(AM_MAKEFLAGS) TESTS_ENVIRONMENT='$(srcdir)/test-wrapper.sh \
-                                       installed $(tests_rpath) \
-                                       $(program_transform_name)' \
-               check-TESTS
+       $(MAKE) $(AM_MAKEFLAGS) \
+               TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT' check-TESTS
+endif !STANDALONE
 
 if MUDFLAP
 static_build=yes
 libmudflap = -lmudflap
 endif
 
+if STANDALONE
+libdw = -ldw
+libelf = -lelf
+libasm = -lasm
+libebl = -lebl
+else !STANDALONE
 if BUILD_STATIC
 libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
 libelf = ../libelf/libelf.a
@@ -106,6 +130,7 @@ libelf = ../libelf/libelf.so
 libasm = ../libasm/libasm.so
 endif
 libebl = ../libebl/libebl.a
+endif !STANDALONE
 
 arextract_LDADD = $(libelf) $(libmudflap)
 arsymtest_LDADD = $(libelf) $(libmudflap)
index 1526f02a5ccd361e9797db3c39168838b3b2df22..33c3586d9f4e74bd2a91a61a36e1e14908afe3a4 100644 (file)
@@ -14,7 +14,7 @@
 #include <config.h>
 #include <assert.h>
 #include <inttypes.h>
-#include <libdwfl.h>
+#include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
 #include <argp.h>
 #include <stdio.h>
index f414983cbf8b07ec1d087114b5c290ae12644699..d9ba4384bb9382478e45a4b634d1b210a8658433 100644 (file)
@@ -1,5 +1,21 @@
+/* Copyright (C) 2005 Red Hat, Inc.
+
+   This program is Open Source software; you can redistribute it and/or
+   modify it under the terms of the Open Software License version 1.0 as
+   published by the Open Source Initiative.
+
+   You should have received a copy of the Open Software License along
+   with this program; if not, you may obtain a copy of the Open Software
+   License version 1.0 from http://www.opensource.org/licenses/osl.php or
+   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
+   3001 King Ranch Road, Ukiah, CA 95482.   */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
index cfaae345a73676933b476e818ca2df1ec77ee8d8..3b3bf0637bff56fb71533b67d32932c6a29e57fb 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
index b9a1037f3a19c8746f85a2ed6b0261db6f4151c4..aac5b6aefb17d0025d930810056693f74cdf9137 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
index 155613c5a66ccf0725287b138e46bb4420ba2563..1b4714e437583fb7735e030a5252cfe9b661ea8e 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
index 50c3c5a5f85f8d2380e6a7b7324dbe641ca6961d..affc0c90f73a7fdb0b2419eeaea16a594f72a3c4 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <stdlib.h>
index e5881a53114e01bf1e1b511f98b5a42ee69ceb5c..629ec67f73f1d88e09a0402d4dbd3035fe60c047 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <stdlib.h>
index 5ceded6505d9aec0fafad150682030d28b7b96cc..9e9135726d9f748e9bae3856b9c0976a5060f3d0 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
-#include <libasm.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <stdlib.h>
index 5c94d8950283d63f07dc3329e6cee85141f1986e..28fedf6c589e0f6cf56b9587780824b6b387d5a9 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <unistd.h>
index cfe53fcacaffaf19249aa58c569bef1b4a980847..19d687d95ccf36e212e6e4756ad623d32c562b3e 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <unistd.h>
index 1f03d8d78191f0d9263733ca1a6eeb0203a08a38..2c1880f5ea64b0893595e7186065cbb38de7fcf9 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/tests/configure.ac b/tests/configure.ac
new file mode 100644 (file)
index 0000000..8d515c7
--- /dev/null
@@ -0,0 +1,59 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl Configure input file for elfutils test suite.              -*-autoconf-*-
+dnl
+dnl Copyright (C) 2005 Red Hat, Inc.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, version 2.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software Foundation,
+dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+AC_INIT([Red Hat elfutils tests],[0.117],
+       [http://bugzilla.redhat.com/bugzilla/],
+       [elfutils-tests])
+
+AC_COPYRIGHT([Copyright (C) 2005 Red Hat, Inc.])
+AC_PREREQ(2.59)                        dnl Minimum Autoconf version required.
+
+AM_INIT_AUTOMAKE([foreign 1.7])
+
+AC_CONFIG_SRCDIR([allfcts.c])
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_HEADERS([config.h])
+
+AC_PROG_CC
+
+AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -std=gnu99"
+AC_COMPILE_IFELSE([dnl
+int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }],
+                 ac_cv_c99=yes, ac_cv_c99=no)
+CFLAGS="$old_CFLAGS"])
+AS_IF([test "x$ac_cv_c99" != xyes],
+      AC_MSG_ERROR([gcc with C99 support required]))
+
+AC_CHECK_HEADERS([libelf.h elfutils/libdw.h],,
+[AC_MSG_ERROR([elfutils-devel package not installed])])
+
+AC_CHECK_LIB([asm], [asm_begin], [have_libasm=yes], [have_libasm=no])
+AM_CONDITIONAL(HAVE_LIBASM, [test $have_libasm = yes])
+
+AM_CONDITIONAL(STANDALONE, true)
+AM_CONDITIONAL(BUILD_STATIC, false)
+AM_CONDITIONAL(TESTS_RPATH, false)
+AM_CONDITIONAL(MUDFLAP, false)
+AM_CONDITIONAL(GCOV, false)
+
+dnl Text of the config.h file.
+AH_BOTTOM([#define ELFUTILS_HEADER(name) <elfutils/lib##name.h>])
+
+AC_OUTPUT
index 77d437aac5eb1f08e0f67d39966df2b16c8d70e5..52b9454f168d27ac91839dad845d8784d4e6a8e9 100644 (file)
@@ -22,7 +22,7 @@
 #include <error.h>
 #include <locale.h>
 #include <argp.h>
-#include <libdwfl.h>
+#include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
 
 static bool show_inlines;
@@ -79,11 +79,10 @@ print_instance (Dwarf_Die *instance, void *arg)
     printf (" (highpc => %s)", dwarf_errmsg (-1));
 
   Dwarf_Attribute attr_mem;
-  Dwarf_Attribute *attr = INTUSE(dwarf_attr) (instance, DW_AT_entry_pc,
-                                             &attr_mem);
+  Dwarf_Attribute *attr = dwarf_attr (instance, DW_AT_entry_pc, &attr_mem);
   if (attr != NULL)
     {
-      if (INTUSE(dwarf_formaddr) (attr, &entry) == 0)
+      if (dwarf_formaddr (attr, &entry) == 0)
        entry += info->dwbias;
       else
        printf (" (entrypc => %s)", dwarf_errmsg (-1));
@@ -182,6 +181,10 @@ print_module (Dwfl_Module *mod __attribute__ ((unused)),
 
 static bool show_functions;
 
+/* gettext helper macro.  */
+#undef N_
+#define N_(Str) Str
+
 static const struct argp_option options[] =
   {
     { "functions", 'f', NULL, 0, N_("Additionally show function names"), 0 },
index 0a2e86e0d80d2ef92827491f3ede51ecff8c2982..ad668cdd6cf1cf1bdecea94db2dd8468fe1acc32 100644 (file)
@@ -14,7 +14,7 @@
 #include <config.h>
 #include <assert.h>
 #include <inttypes.h>
-#include <libdwfl.h>
+#include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
 #include <argp.h>
 #include <stdio.h>
index 3318f311f1674a51ddde1b8e211038fa41655dbf..4cdb79bc233607fe2d118e1fa3c41c109d3f1f28 100644 (file)
@@ -14,7 +14,7 @@
 #include <config.h>
 #include <assert.h>
 #include <inttypes.h>
-#include <libdwfl.h>
+#include ELFUTILS_HEADER(dwfl)
 #include <dwarf.h>
 #include <argp.h>
 #include <stdio.h>
index 1be76b2df8fa18550629f86fa0561a4ed61694c7..705646c351f530f2788490d169e7798e71c60631 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
index 1294342cca83b140b80dbe96e6d870b751061c64..b29213dead9cbd9b96b4f2046e06f8607c81fd25 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
index 6a8c0764f78a267b4178cb454a4928a1efe0984b..f5c58db826282823a5f0bbde8e2624a1ff54e16b 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <inttypes.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
index e2791a2990b7cefee0541b7afaccf872240e443a..8bb6825203e2e3ce1ce05391a1f967cc01db1361 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <fcntl.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
index 2b92af25c8506091282e4c5e6af55cfff34d0268..7b10be828464f0d7c582b1607582bf103c9ae7f7 100644 (file)
@@ -1,6 +1,22 @@
+/* Copyright (C) 2005 Red Hat, Inc.
+
+   This program is Open Source software; you can redistribute it and/or
+   modify it under the terms of the Open Software License version 1.0 as
+   published by the Open Source Initiative.
+
+   You should have received a copy of the Open Software License along
+   with this program; if not, you may obtain a copy of the Open Software
+   License version 1.0 from http://www.opensource.org/licenses/osl.php or
+   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
+   3001 King Ranch Road, Ukiah, CA 95482.   */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <inttypes.h>
 #include <assert.h>
-#include <libdwfl.h>
+#include ELFUTILS_HEADER(dwfl)
 #include <argp.h>
 #include <stdio.h>
 #include <locale.h>
index 8c8b335a1f2882457d63225884c559e1afd3ced9..f651e99fb8c6aed1194432b9d4ac9ec51d0395ac 100644 (file)
    by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
    3001 King Ranch Road, Ukiah, CA 95482.   */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <assert.h>
 #include <fcntl.h>
 #include <libelf.h>
index fba73759b9949a6e176546877ffc85ba4739091c..cf6eabbf45e7e57009e029a98c11f497f78253ea 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
index d4f992f32ee988663e7cb059702b6d2706413c52..a48f93874452bb3ced08c2b6efdda1fc86febbfb 100644 (file)
@@ -16,7 +16,7 @@
 #include <dwarf.h>
 #include <inttypes.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
index 160adf1e2f194600e9d0795b3e84df600f680ec2..85f7ab686bf78cd14acbae23869f4b05b3edee33 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <libebl.h>
+#include ELFUTILS_HEADER(ebl)
 
 
 int
index 30f3a07dc0337529ba46246018bae6a8b1cc3d65..835857f094d8f1f212a342b51b19e0b6d57057ca 100644 (file)
@@ -24,7 +24,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <libebl.h>
+#include ELFUTILS_HEADER(ebl)
 
 
 int