Check for python in configure
authorSara Golemon <sgolemon@fb.com>
Thu, 11 Jun 2015 21:06:38 +0000 (14:06 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 11 Jun 2015 21:50:33 +0000 (14:50 -0700)
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
folly/configure.ac

index b6f8310c8d76e911bdf3d4326017430d207fb40d..c7519d181dc6120f65715cc9f39bef6eb2d00bd3 100644 (file)
@@ -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 = \
index 1fffc4e470eaf61a87932c4ecb93e1e9ffc13d2b..8b975066c5d6fe5bdfb317992241439e9139f06c 100644 (file)
@@ -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])