mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04:00
Now that libarchive is being built in more environments,
factor out the platform-specific configuration header a bit more cleanly. Suggested by: Joerg Sonnenberger
This commit is contained in:
parent
782a032689
commit
da7bcba2e8
2 changed files with 6 additions and 8 deletions
|
|
@ -9,7 +9,7 @@ LDADD= -lbz2 -lz
|
|||
# Major: Bumped ONLY when API/ABI breakage happens (see SHLIB_MAJOR)
|
||||
# Minor: Bumped when significant new features are added
|
||||
# Revision: Bumped on any notable change
|
||||
VERSION= 2.0.27
|
||||
VERSION= 2.0.28
|
||||
|
||||
ARCHIVE_API_MAJOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//'
|
||||
ARCHIVE_API_MINOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//'
|
||||
|
|
@ -20,6 +20,7 @@ SHLIB_MAJOR= 4
|
|||
|
||||
CFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\"
|
||||
CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\"
|
||||
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
|
||||
CFLAGS+= -I${.OBJDIR}
|
||||
|
||||
WARNS?= 6
|
||||
|
|
|
|||
|
|
@ -36,15 +36,12 @@
|
|||
#ifndef ARCHIVE_PLATFORM_H_INCLUDED
|
||||
#define ARCHIVE_PLATFORM_H_INCLUDED
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#if defined(PLATFORM_CONFIG_H)
|
||||
/* Use hand-built config.h in environments that need it. */
|
||||
#include PLATFORM_CONFIG_H
|
||||
#elif defined(HAVE_CONFIG_H)
|
||||
/* Most POSIX platforms use the 'configure' script to build config.h */
|
||||
#include "../config.h"
|
||||
#elif defined(__FreeBSD__)
|
||||
/* Building as part of FreeBSD system requires a pre-built config.h. */
|
||||
#include "config_freebsd.h"
|
||||
#elif defined(_WIN32)
|
||||
/* Win32 can't run the 'configure' script. */
|
||||
#include "config_windows.h"
|
||||
#else
|
||||
/* Warn if the library hasn't been (automatically or manually) configured. */
|
||||
#error Oops: No config.h and no pre-built configuration in archive_platform.h.
|
||||
|
|
|
|||
Loading…
Reference in a new issue