Files
libdwarf-code/dwarfgen/configure.in
David Anderson 37d0ff1235 Now we allow --enabled-shared and --disable-nonshared
at the top level and all lower levels.

README
configure
configure.in
dwarfdump/Makefile.in
dwarfdump/configure
dwarfdump/configure.in
dwarfexample/configure
dwarfexample/configure.in
dwarfgen/configure
dwarfgen/configure.in
libdwarf/ChangeLog
2015-12-31 13:51:31 -08:00

73 lines
2.5 KiB
Plaintext

dnl This is input to autoconf, producing a configure script.
AC_INIT(dwarfgen.cc)
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.]))
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])
])
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'
])
AC_OUTPUT(Makefile)