Files
libdwarf-code/dwarfexample/configure.in
David Anderson 3f9c12e062 Add a new option to simplereader
(for testing libdwarf it's no longer so simple).
Support configure --enable-wall.
dwarfexample/Makefile.in
dwarfexample/configure
dwarfexample/configure.in
dwarfexample/simplereader.c

Now works with DW_FORM_GNU_strp_alt and DW_FORM_strp_sup
(as well as it can) even if there is no error argument passed
in to dwarf_formstring (and now dwarf_diename()
and dwarf_die_text() call dwarf_formstring() so all
types of string values are handled).
libdwarf/dwarf_form.c
libdwarf/dwarf_query.c
2016-03-14 07:07:12 -07:00

81 lines
2.8 KiB
Plaintext

AC_INIT(simplereader.c,frame1.c)
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_CXX
AC_C_BIGENDIAN
AC_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_HEADERS(elf.h libelf.h sgidefs.h sys/types.h)
dnl Attempt to determine if it is really IRIX/SGI or 'other'.
AC_TRY_COMPILE([#include <sgidefs.h>],[ __uint32_t p; p = 27;] ,
AC_DEFINE(HAVE___UINT32_T_IN_SGIDEFS_H,1,
[Define 1 if __uint32_t is in sgidefs.h.]))
AC_TRY_COMPILE([#include <sgidefs.h>],[ __uint64_t p; p = 27;] ,
AC_DEFINE(HAVE___UINT64_T_IN_SGIDEFS_H,1,
[Define 1 if __uint64_t is in sgidefs.h.]))
AC_TRY_COMPILE([#include <sgidefs.h>],[ __uint64_t p; p = 27;] ,
AC_DEFINE(HAVE___UINT64_T_IN_SGIDEFS_H,1,
[Define 1 if is in sgidefs.h.]))
dnl the existence of sgidefs.h does not prove it's truly SGI, nor
dnl prove that __uint32_t or __uint64_t is defined therein.
AC_TRY_COMPILE([#include <sgidefs.h>],[ __uint32_t p; p = 27;] ,
AC_DEFINE(HAVE___UINT32_T_IN_SGIDEFS_H,1,
[Define 1 if __uint32_t is in sgidefs.h.]))
AC_TRY_COMPILE([#include <stdint.h>],[intptr_t p; p = 27;] ,
AC_DEFINE(HAVE_INTPTR_T,1,
[Define 1 if intptr_t defined in C99 stdint.h]))
AC_TRY_COMPILE([#include <sgidefs.h>],[ __uint64_t p; p = 27;] ,
AC_DEFINE(HAVE___UINT64_T_IN_SGIDEFS_H,1,
[Define 1 if __uint64_t is in sgidefs.h.]))
AC_TRY_COMPILE([#include <sgidefs.h>],[ __uint64_t p; p = 27;] ,
AC_DEFINE(HAVE___UINT64_T_IN_SGIDEFS_H,1,
[Define 1 if is in sgidefs.h.]))
dnl default-disabled shared
shrd=''
AC_ARG_ENABLE(shared,AC_HELP_STRING([--enable-shared],
[build shared library libdwarf.so and use it if present]))
AS_IF([ test "x$enable_shared" = "xyes"], [
shrd='--enable-shared'])
nonshrd=''
dnl default-enabled nonshared
AC_SUBST(build_nonshared,[none.a])
AC_ARG_ENABLE(nonshared,AC_HELP_STRING([--disable-nonshared],
[do not build archive library libdwarf.a]))
AS_IF([ test "x$enable_nonshared" = "xno"], [
nonshrd='--disable-shared'
])
dnl This adds compiler option -Wall (gcc compiler warnings)
AC_SUBST(dwfwall,[])
AC_ARG_ENABLE(wall,AC_HELP_STRING([--enable-wall],
[Add -Wall (default is none)]),
[ AC_SUBST(dwfwall,[]) ]
[ AC_SUBST(dwfwall,["-Wall -O0 -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wextra -Wcomment -Wformat -Wpedantic -Wuninitialized -Wno-long-long -Wshadow"]) ])
AC_SUBST(dwfzlib,[])
AC_TRY_COMPILE([#include "zlib.h"],[
Bytef dest[100];
uLongf destlen = 100;
Bytef *src = 0;
uLong srclen = 3;
int res = uncompress(dest,&destlen,src,srclen);
if (res == Z_OK) {
/* ALL IS WELL */
}
] ,
[AC_DEFINE(HAVE_ZLIB,1,
[Define 1 if zlib (decompression library) seems available.])
AC_SUBST(dwfzlib,[-lz])
])
AC_OUTPUT(Makefile)