Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Rework some hardcoded dependencies.
Vsevolod Stakhov committed 12 years ago
commit 07b8f9fa81f323093b13406c7f9c8cad66299024
parent 8c626ed
4 files changed +85 -86
modified configure.ac
@@ -13,6 +13,26 @@ AC_PROG_CC_C99
LT_INIT()
AC_CONFIG_MACRO_DIR([m4])

+
AC_C_CONST
+
AC_TYPE_SIZE_T
+
AC_CHECK_FUNCS(memmove bcopy)
+

+
AC_CHECK_HEADERS_ONCE([fcntl.h unistd.h])
+
AC_TYPE_OFF_T
+
AC_FUNC_MMAP
+

+
if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
+
    FILEMAP=unixfilemap
+
else
+
    FILEMAP=readfilemap
+
fi
+
AC_SUBST(FILEMAP)
+
AC_CHECK_HEADERS_ONCE([machine/endian.h])
+
AC_CHECK_HEADERS_ONCE([endian.h])
+
AC_CHECK_HEADERS_ONCE([fcntl.h])
+
AC_CHECK_HEADERS_ONCE([dlfcn.h])
+
AC_CHECK_HEADERS_ONCE([memory.h])
+

AC_DEFUN([AC_PROG_GIT], [AC_CHECK_PROG(GITBIN,git,yes)])
AC_PROG_GIT
if test x"${GITBIN}" == x"yes" ; then
@@ -33,6 +53,16 @@ AC_MSG_RESULT([$GIT_HEAD])
AC_SUBST([GIT_HEAD])
AC_DEFINE_UNQUOTED([GIT_HEAD], $GIT_HEAD)
AC_DEFINE([PKG_API], [api_ver])
+

+

+
AC_SEARCH_LIBS([archive_read_open], [archive], [], [
+
  AC_MSG_ERROR([unable to find the archive_read() function])
+
])
+
AC_CHECK_HEADERS([archive.h],
+
	[pkg_found_archive_headers=yes; break;])
+
AS_IF([test "x$pkg_found_archive_headers" != "xyes"],
+
	[AC_MSG_ERROR([Unable to find the libarchive headers])])
+

AC_CHECK_HEADER([gelf.h], [
	AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
	AC_CHECK_LIB(elf, gelf_getehdr, [
@@ -41,7 +71,7 @@ AC_CHECK_HEADER([gelf.h], [
	])
], [
    LIBELF_LIB="\$(top_builddir)/external/libelf.la"
-
    LIBELF_BUNDLED="\$(top_builddir)/external/libelf.la"
+
    LIBELF_BUNDLED="libelf.la"
    LIBELF_INCLUDE="-I\$(top_srcdir)/external/libelf"
])

modified external/Makefile.am
@@ -38,6 +38,7 @@ noinst_HEADERS= expat/amiga/expat_68k.h \
			libelf/elfdefinitions.h \
			libelf/gelf.h \
			libelf/libelf.h \
+
			libelf/native-elf-format.h \
			libucl/include/ucl.h \
			libucl/src/xxhash.h \
			libucl/src/ucl_internal.h \
@@ -114,6 +115,7 @@ libelf_la_SOURCES= libelf/elf.c \
			libelf/libelf_fsize.c \
			libelf/libelf_msize.c \
			libelf/libelf_convert.c
+
libelf_la_CFLAGS=	-I$(top_srcdir)/external/libelf
			
noinst_LTLIBRARIES=	libucl.la libsqlite.la libyaml.la libexpat.la @LIBELF_BUNDLED@

@@ -186,7 +188,9 @@ libsqlite_la_CFLAGS= -DHAVE_POSIX_FALLOCATE=1 \

CLEANFILES=	libelf/libelf_fsize.c \
			libelf/libelf_msize.c \
-
			libelf/libelf_convert.c
+
			libelf/libelf_convert.c \
+
			libelf/native-elf-format.h
+
BUILT_SOURCES = libelf/native-elf-format.h

libelf/libelf_convert.c:
	@echo "    M4    " $@;
@@ -198,4 +202,6 @@ libelf/libelf_fsize.c:

libelf/libelf_msize.c:
	@echo "    M4    " $@;
-
	@m4 -D SRCDIR=libelf libelf/elf_types.m4 libelf/libelf_msize.m4 > $@

\ No newline at end of file
+
	@m4 -D SRCDIR=libelf libelf/elf_types.m4 libelf/libelf_msize.m4 > $@
+
libelf/native-elf-format.h:
+
	libelf/native-elf-format > libelf/native-elf-format.h

\ No newline at end of file
modified external/expat/expat_config.h
@@ -1,6 +1,16 @@
/* $FreeBSD$ */

+
#ifdef HAVE_CONFIG_H
+
#include "pkg_config.h"
+
#endif
+

+
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
+
#endif
+

+
#ifdef HAVE_ENDIAN_H
+
#include <endian.h>
+
#endif

/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#if BYTE_ORDER == LITTLE_ENDIAN
@@ -9,79 +19,6 @@
#define BYTEORDER 4321
#endif

-
/* Define to 1 if you have the `bcopy' function. */
-
#define HAVE_BCOPY 1
-

-
/* Define to 1 if you have the <dlfcn.h> header file. */
-
#define HAVE_DLFCN_H 1
-

-
/* Define to 1 if you have the <fcntl.h> header file. */
-
#define HAVE_FCNTL_H 1
-

-
/* Define to 1 if you have the `getpagesize' function. */
-
#define HAVE_GETPAGESIZE 1
-

-
/* Define to 1 if you have the <inttypes.h> header file. */
-
#define HAVE_INTTYPES_H 1
-

-
/* Define to 1 if you have the `memmove' function. */
-
#define HAVE_MEMMOVE 1
-

-
/* Define to 1 if you have the <memory.h> header file. */
-
#define HAVE_MEMORY_H 1
-

-
/* Define to 1 if you have a working `mmap' system call. */
-
#define HAVE_MMAP 1
-

-
/* Define to 1 if you have the <stdint.h> header file. */
-
#define HAVE_STDINT_H 1
-

-
/* Define to 1 if you have the <stdlib.h> header file. */
-
#define HAVE_STDLIB_H 1
-

-
/* Define to 1 if you have the <strings.h> header file. */
-
#define HAVE_STRINGS_H 1
-

-
/* Define to 1 if you have the <string.h> header file. */
-
#define HAVE_STRING_H 1
-

-
/* Define to 1 if you have the <sys/param.h> header file. */
-
#define HAVE_SYS_PARAM_H 1
-

-
/* Define to 1 if you have the <sys/stat.h> header file. */
-
#define HAVE_SYS_STAT_H 1
-

-
/* Define to 1 if you have the <sys/types.h> header file. */
-
#define HAVE_SYS_TYPES_H 1
-

-
/* Define to 1 if you have the <unistd.h> header file. */
-
#define HAVE_UNISTD_H 1
-

-
/* Define to the sub-directory in which libtool stores uninstalled libraries.
-
   */
-
#undef LT_OBJDIR
-

-
/* Define to the address where bug reports for this package should be sent. */
-
#define PACKAGE_BUGREPORT "expat-bugs@libexpat.org"
-

-
/* Define to the full name of this package. */
-
#define PACKAGE_NAME "expat"
-

-
/* Define to the full name and version of this package. */
-
#define PACKAGE_STRING "expat 2.1.0"
-

-
/* Define to the one symbol short name of this package. */
-
#define PACKAGE_TARNAME "expat"
-

-
/* Define to the home page for this package. */
-
#define PACKAGE_URL ""
-

-
/* Define to the version of this package. */
-
#define PACKAGE_VERSION "2.1.0"
-

-
/* Define to 1 if you have the ANSI C header files. */
-
#define STDC_HEADERS 1
-

/* whether byteorder is bigendian */
#if BYTE_ORDER == BIG_ENDIAN
#define WORDS_BIGENDIAN
@@ -99,14 +36,4 @@
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1

-
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
-
/* #undef __func__ */
-

-
/* Define to empty if `const' does not conform to ANSI C. */
-
/* #undef const */
-

-
/* Define to `long int' if <sys/types.h> does not define. */
-
/* #undef off_t */

-
/* Define to `unsigned int' if <sys/types.h> does not define. */
-
/* #undef size_t */
modified pkg_config.h.in
@@ -3,21 +3,45 @@
/* "Git revision" */
#undef GIT_HEAD

+
/* Define to 1 if you have the <archive.h> header file. */
+
#undef HAVE_ARCHIVE_H
+

+
/* Define to 1 if you have the `bcopy' function. */
+
#undef HAVE_BCOPY
+

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

+
/* Define to 1 if you have the <endian.h> header file. */
+
#undef HAVE_ENDIAN_H
+

+
/* Define to 1 if you have the <fcntl.h> header file. */
+
#undef HAVE_FCNTL_H
+

/* Define to 1 if you have the <gelf.h> header file. */
#undef HAVE_GELF_H

+
/* Define to 1 if you have the `getpagesize' function. */
+
#undef HAVE_GETPAGESIZE
+

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the 'elf' library (-lelf). */
#undef HAVE_LIBELF

+
/* Define to 1 if you have the <machine/endian.h> header file. */
+
#undef HAVE_MACHINE_ENDIAN_H
+

+
/* Define to 1 if you have the `memmove' function. */
+
#undef HAVE_MEMMOVE
+

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

+
/* Define to 1 if you have a working `mmap' system call. */
+
#undef HAVE_MMAP
+

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

@@ -30,6 +54,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H

+
/* Define to 1 if you have the <sys/param.h> header file. */
+
#undef HAVE_SYS_PARAM_H
+

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H

@@ -72,3 +99,12 @@

/* Version number of package */
#undef VERSION
+

+
/* Define to empty if `const' does not conform to ANSI C. */
+
#undef const
+

+
/* Define to `long int' if <sys/types.h> does not define. */
+
#undef off_t
+

+
/* Define to `unsigned int' if <sys/types.h> does not define. */
+
#undef size_t