From 5961a52b70dfb3783c3506970c76332fc6e75fd1 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Thu, 11 Jun 2015 14:06:38 -0700 Subject: [PATCH] Check for python in configure Summary: Some OSs have python named according to a version ID e.g. `python2.7` without a symlink from plain `python` Use autotool's AM_PATH_PYTHON to search for a suitable interpreter and use that to generate the *Tables.cpp files. Closes #109 Reviewed By: @yfeldblum Differential Revision: D2147977 --- folly/Makefile.am | 6 +++--- folly/configure.ac | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/folly/Makefile.am b/folly/Makefile.am index b6f8310c..c7519d18 100644 --- a/folly/Makefile.am +++ b/folly/Makefile.am @@ -321,15 +321,15 @@ nobase_follyinclude_HEADERS = \ wangle/ssl/TLSTicketKeySeeds.h FormatTables.cpp: build/generate_format_tables.py - build/generate_format_tables.py + $(PYTHON) build/generate_format_tables.py CLEANFILES += FormatTables.cpp EscapeTables.cpp: build/generate_escape_tables.py - build/generate_escape_tables.py + $(PYTHON) build/generate_escape_tables.py CLEANFILES += EscapeTables.cpp GroupVarintTables.cpp: build/generate_varint_tables.py - build/generate_varint_tables.py + $(PYTHON) build/generate_varint_tables.py CLEANFILES += GroupVarintTables.cpp libfollybase_la_SOURCES = \ diff --git a/folly/configure.ac b/folly/configure.ac index 1fffc4e4..8b975066 100644 --- a/folly/configure.ac +++ b/folly/configure.ac @@ -72,6 +72,9 @@ AX_BOOST_REGEX AX_BOOST_SYSTEM AX_BOOST_FILESYSTEM +# Check for python interpreter +AM_PATH_PYTHON + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h features.h inttypes.h limits.h stdint.h stdlib.h string.h sys/time.h unistd.h mutex.h malloc.h emmintrin.h byteswap.h bits/functexcept.h bits/c++config.h]) -- 2.34.1