Skip to content

Commit

Permalink
Merge bitcoin#13659: build: add missing leveldb defines
Browse files Browse the repository at this point in the history
768981c build: add missing leveldb defines (Cory Fields)

Pull request description:

  Fixes bitcoin#13585.

  src/leveldb/build_detect_platform shows how upstream defines them.

  These platform may not be able to fully build or run Bitcoin Core, but defining all known to leveldb saves future hassle.

  Now that all possible platforms are enumerated, specifying an unknown one is an error.

Tree-SHA512: 89adfb8867248e50d713cb84485c72a398df8b2af467599cf292132342b5b47f01be3a298ca33e382e210004123aa72a6338bc911d38d40d8ceaef5083e0b025
  • Loading branch information
sipa authored and gades committed Mar 16, 2022
1 parent dd67ee0 commit f57fd8a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -600,20 +600,34 @@ case $host in
CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
OBJCXXFLAGS="$CXXFLAGS"
;;
*android*)
dnl make sure android stays above linux for hosts like *linux-android*
LEVELDB_TARGET_FLAGS="-DOS_ANDROID"
;;
*linux*)
TARGET_OS=linux
LEVELDB_TARGET_FLAGS="-DOS_LINUX"
;;
*kfreebsd*)
LEVELDB_TARGET_FLAGS="-DOS_KFREEBSD"
;;
*freebsd*)
LEVELDB_TARGET_FLAGS="-DOS_FREEBSD"
;;
*openbsd*)
LEVELDB_TARGET_FLAGS="-DOS_OPENBSD"
;;
*dragonfly*)
LEVELDB_TARGET_FLAGS="-DOS_DRAGONFLYBSD"
;;
*solaris*)
LEVELDB_TARGET_FLAGS="-DOS_SOLARIS"
;;
*hpux*)
LEVELDB_TARGET_FLAGS="-DOS_HPUX"
;;
*)
OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])
LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}"
AC_MSG_ERROR(Cannot build leveldb for $host. Please file a bug report.)
;;
esac

Expand Down

0 comments on commit f57fd8a

Please sign in to comment.