Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
77081999
Commit
77081999
authored
May 17, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to autotools for python detection
parent
d001bcd2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
228 additions
and
255 deletions
+228
-255
Makefile.in
Makefile.in
+1
-2
autotools.sh
autotools.sh
+0
-1
ax_python.m4
ax_python.m4
+11
-1
bootstrap
bootstrap
+6
-0
config.h.in
config.h.in
+3
-3
configure
configure
+172
-224
configure.ac
configure.ac
+35
-24
No files found.
Makefile.in
View file @
77081999
...
@@ -4,8 +4,7 @@ CFLAGS=@CFLAGS@
...
@@ -4,8 +4,7 @@ CFLAGS=@CFLAGS@
LDFLAGS
=
@LDFLAGS@ @OPENSSL_LDFLAGS@
LDFLAGS
=
@LDFLAGS@ @OPENSSL_LDFLAGS@
CPPFLAGS
=
@CPPFLAGS@ @OPENSSL_INCLUDES@
CPPFLAGS
=
@CPPFLAGS@ @OPENSSL_INCLUDES@
DEFS
=
@DEFS@
DEFS
=
@DEFS@
COMPILE_FLAGS
=
${
CFLAGS
}
${
CPFLAGS
}
${
CPPFLAGS
}
${
DEFS
}
-Wall
-Wextra
-Wno-deprecated-declarations
-fno-strict-aliasing
-fno-omit-frame-pointer
-ggdb
-Wno-unused-parameter
-fPIC
COMPILE_FLAGS
=
${
CFLAGS
}
${
CPFLAGS
}
${
CPPFLAGS
}
${
DEFS
}
-Wall
-Werror
-Wextra
-Wno-deprecated-declarations
-fno-strict-aliasing
-fno-omit-frame-pointer
-ggdb
-Wno-unused-parameter
-fPIC
#TODO re-add -Werror
EXTRA_LIBS
=
@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
EXTRA_LIBS
=
@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
LOCAL_LDFLAGS
=
-rdynamic
-ggdb
-levent
${
EXTRA_LIBS
}
LOCAL_LDFLAGS
=
-rdynamic
-ggdb
-levent
${
EXTRA_LIBS
}
LINK_FLAGS
=
${
LDFLAGS
}
${
LOCAL_LDFLAGS
}
LINK_FLAGS
=
${
LDFLAGS
}
${
LOCAL_LDFLAGS
}
...
...
autotools.sh
deleted
100755 → 0
View file @
d001bcd2
aclocal
;
autoheader
;
automake
;
autoconf
ax_python.m4
View file @
77081999
...
@@ -56,7 +56,8 @@
...
@@ -56,7 +56,8 @@
AC_DEFUN([AX_PYTHON],
AC_DEFUN([AX_PYTHON],
[AC_MSG_CHECKING(for python build information)
[AC_MSG_CHECKING(for python build information)
AC_MSG_RESULT([])
AC_MSG_RESULT([])
for python in python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
for python in python3.4 python3.3 python3.2 python3.1 python2.7 python2.6 python3, python2, python; do
AC_CHECK_PROGS(PYTHON_BIN, [$python])
AC_CHECK_PROGS(PYTHON_BIN, [$python])
ax_python_bin=$PYTHON_BIN
ax_python_bin=$PYTHON_BIN
if test x$ax_python_bin != x; then
if test x$ax_python_bin != x; then
...
@@ -87,12 +88,21 @@ AC_MSG_RESULT([ Binary: $ax_python_bin])
...
@@ -87,12 +88,21 @@ AC_MSG_RESULT([ Binary: $ax_python_bin])
AC_MSG_RESULT([ Library: $ax_python_lib])
AC_MSG_RESULT([ Library: $ax_python_lib])
AC_MSG_RESULT([ Include Dir: $ax_python_header])
AC_MSG_RESULT([ Include Dir: $ax_python_header])
PYTHON_FOUND=yes
if test x$ax_python_header != xno; then
if test x$ax_python_header != xno; then
PYTHON_INCLUDE_DIR=$ax_python_header
PYTHON_INCLUDE_DIR=$ax_python_header
AC_SUBST(PYTHON_INCLUDE_DIR)
AC_SUBST(PYTHON_INCLUDE_DIR)
else
PYTHON_FOUND=no
fi
fi
if test x$ax_python_lib != xno; then
if test x$ax_python_lib != xno; then
PYTHON_LIB=$ax_python_lib
PYTHON_LIB=$ax_python_lib
AC_SUBST(PYTHON_LIB)
AC_SUBST(PYTHON_LIB)
else
PYTHON_FOUND=no
fi
fi
AC_SUBST(PYTHON_FOUND)
])dnl
])dnl
bootstrap
0 → 100755
View file @
77081999
#! /bin/sh
aclocal
autoheader
automake
--gnu
--add-missing
autoconf
config.h.in
View file @
77081999
...
@@ -164,12 +164,12 @@
...
@@ -164,12 +164,12 @@
/* use lua */
/* use lua */
#undef USE_LUA
#undef USE_LUA
/* fixed for correct valgrind work */
#undef VALGRIND_FIXES
/* use python */
/* use python */
#undef USE_PYTHON
#undef USE_PYTHON
/* fixed for correct valgrind work */
#undef VALGRIND_FIXES
/* Define to `int' if <sys/types.h> doesn't define. */
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
#undef gid_t
...
...
configure
View file @
77081999
...
@@ -624,15 +624,7 @@ EXTRA_LIBS
...
@@ -624,15 +624,7 @@ EXTRA_LIBS
LIBOBJS
LIBOBJS
PYTHON_CFLAGS
PYTHON_CFLAGS
PYTHON_LIBS
PYTHON_LIBS
pkgpyexecdir
PYTHON_FOUND
pyexecdir
pkgpythondir
pythondir
PYTHON_PLATFORM
PYTHON_EXEC_PREFIX
PYTHON_PREFIX
PYTHON_VERSION
PYTHON
PYTHON_LIB
PYTHON_LIB
PYTHON_INCLUDE_DIR
PYTHON_INCLUDE_DIR
PYTHON_BIN
PYTHON_BIN
...
@@ -708,8 +700,8 @@ with_zlib
...
@@ -708,8 +700,8 @@ with_zlib
enable_libconfig
enable_libconfig
enable_extf
enable_extf
enable_liblua
enable_liblua
enable_json
enable_python
enable_python
enable_json
with_progname
with_progname
enable_valgrind
enable_valgrind
'
'
...
@@ -724,8 +716,7 @@ CPPFLAGS
...
@@ -724,8 +716,7 @@ CPPFLAGS
CPP
CPP
LUA
LUA
LUA_INCLUDE
LUA_INCLUDE
LUA_LIB
LUA_LIB'
PYTHON'
# Initialize some variables set by options.
# Initialize some variables set by options.
...
@@ -1338,9 +1329,9 @@ Optional Features:
...
@@ -1338,9 +1329,9 @@ Optional Features:
--enable-libconfig/--disable-libconfig
--enable-libconfig/--disable-libconfig
--enable-extf/--disable-extf
--enable-extf/--disable-extf
--enable-liblua/--disable-liblua
--enable-liblua/--disable-liblua
--enable-python/--disable-python
--enable-json/--disable-json
--enable-json/--disable-json
--enable-valgrind/--disable-valgrind
--enable-valgrind/--disable-valgrind
--enable-python/--disable-python
Optional Packages:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
...
@@ -1363,7 +1354,6 @@ Some influential environment variables:
...
@@ -1363,7 +1354,6 @@ Some influential environment variables:
LUA The Lua interpreter, e.g. /usr/bin/lua5.1
LUA The Lua interpreter, e.g. /usr/bin/lua5.1
LUA_INCLUDE The Lua includes, e.g. -I/usr/include/lua5.1
LUA_INCLUDE The Lua includes, e.g. -I/usr/include/lua5.1
LUA_LIB The Lua library, e.g. -llua5.1
LUA_LIB The Lua library, e.g. -llua5.1
PYTHON the Python interpreter
Use these variables to override the choices made by `configure' or to help
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
it to find libraries and programs with nonstandard names/locations.
...
@@ -5940,14 +5930,25 @@ fi
...
@@ -5940,14 +5930,25 @@ fi
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for python"
>
&5
$as_echo_n
"checking for python... "
>
&6
;
}
# Check whether --enable-python was given.
# Check whether --enable-python was given.
if
test
"
${
enable_python
+set
}
"
=
set
;
then
:
if
test
"
${
enable_python
+set
}
"
=
set
;
then
:
enableval
=
$enable_python
;
enableval
=
$enable_python
;
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for python build information"
>
&5
if
test
"x
$enableval
"
=
"xno"
;
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: disabled"
>
&5
$as_echo
"disabled"
>
&6
;
}
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: enabled"
>
&5
$as_echo
"enabled"
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for python build information"
>
&5
$as_echo_n
"checking for python build information... "
>
&6
;
}
$as_echo_n
"checking for python build information... "
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
$as_echo
""
>
&6
;
}
$as_echo
""
>
&6
;
}
for
python
in
python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python
;
do
for
python
in
python3.4 python3.3 python3.2 python3.1 python2.7 python2.6 python3, python2, python
;
do
for
ac_prog
in
$python
for
ac_prog
in
$python
do
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
# Extract the first word of "$ac_prog", so it can be a program name with args.
...
@@ -6097,102 +6098,69 @@ $as_echo " Library: $ax_python_lib" >&6; }
...
@@ -6097,102 +6098,69 @@ $as_echo " Library: $ax_python_lib" >&6; }
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: Include Dir:
$ax_python_header
"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: Include Dir:
$ax_python_header
"
>
&5
$as_echo
" Include Dir:
$ax_python_header
"
>
&6
;
}
$as_echo
" Include Dir:
$ax_python_header
"
>
&6
;
}
PYTHON_FOUND
=
yes
if
test
x
$ax_python_header
!=
xno
;
then
if
test
x
$ax_python_header
!=
xno
;
then
PYTHON_INCLUDE_DIR
=
$ax_python_header
PYTHON_INCLUDE_DIR
=
$ax_python_header
else
PYTHON_FOUND
=
no
fi
fi
if
test
x
$ax_python_lib
!=
xno
;
then
if
test
x
$ax_python_lib
!=
xno
;
then
PYTHON_LIB
=
$ax_python_lib
PYTHON_LIB
=
$ax_python_lib
else
PYTHON_FOUND
=
no
fi
fi
if
test
$PYTHON_FOUND
=
no
;
then
as_fn_error
$?
"No supported python lib version found. Try --disable-python"
"
$LINENO
"
5
else
EXTRA_LIBS
=
"
${
EXTRA_LIBS
}
-l
${
PYTHON_LIB
}
"
CPPFLAGS
=
"
${
CPPFLAGS
}
-I
${
PYTHON_INCLUDE_DIR
}
"
$as_echo
"#define USE_PYTHON 1"
>>
confdefs.h
fi
fi
if
test
-n
"
$PYTHON
"
;
then
# If the user set $PYTHON, use it and don't search something else.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
$PYTHON
version is >= 2.7.0"
>
&5
$as_echo_n
"checking whether
$PYTHON
version is >= 2.7.0... "
>
&6
;
}
prog
=
"import sys
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
minver = list(map(int, '2.7.0'.split('.'))) + [0, 0, 0]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
sys.exit(sys.hexversion < minverhex)"
if
{
echo
"
$as_me
:
$LINENO
:
$PYTHON
-c "
$prog
""
>
&5
(
$PYTHON
-c
"
$prog
"
)
>
&5 2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
then
:
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: yes"
>
&5
$as_echo
"yes"
>
&6
;
}
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
as_fn_error
$?
"Python interpreter is too old"
"
$LINENO
"
5
fi
am_display_PYTHON
=
$PYTHON
else
# Otherwise, try each interpreter until we find one that satisfies
# VERSION.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for a Python interpreter with version >= 2.7.0"
>
&5
$as_echo_n
"checking for a Python interpreter with version >= 2.7.0... "
>
&6
;
}
if
${
am_cv_pathless_PYTHON
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
else
for
am_cv_pathless_PYTHON
in
python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none
;
do
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: enabled"
>
&5
test
"
$am_cv_pathless_PYTHON
"
=
none
&&
break
$as_echo
"enabled"
>
&6
;
}
prog
=
"import sys
# split strings by '.' and convert to numeric. Append some zeros
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for python build information"
>
&5
# because we need at least 4 digits for the hex conversion.
$as_echo_n
"checking for python build information... "
>
&6
;
}
# map returns an iterator in Python 3.0 and a list in 2.x
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
minver = list(map(int, '2.7.0'.split('.'))) + [0, 0, 0]
$as_echo
""
>
&6
;
}
minverhex = 0
for
python
in
python3.4 python3.3 python3.2 python3.1 python2.7 python2.6 python3, python2, python
;
do
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
for
ac_prog
in
$python
sys.exit(sys.hexversion < minverhex)"
do
if
{
echo
"
$as_me
:
$LINENO
:
$am_cv_pathless_PYTHON
-c "
$prog
""
>
&5
# Extract the first word of "$ac_prog", so it can be a program name with args.
(
$am_cv_pathless_PYTHON
-c
"
$prog
"
)
>
&5 2>&5
set
dummy
$ac_prog
;
ac_word
=
$2
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
then
:
break
fi
done
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$am_cv_pathless_PYTHON
"
>
&5
$as_echo
"
$am_cv_pathless_PYTHON
"
>
&6
;
}
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
if
test
"
$am_cv_pathless_PYTHON
"
=
none
;
then
PYTHON
=
:
else
# Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
set
dummy
$am_cv_pathless_PYTHON
;
ac_word
=
$2
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$ac_word
"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$ac_word
"
>
&5
$as_echo_n
"checking for
$ac_word
... "
>
&6
;
}
$as_echo_n
"checking for
$ac_word
... "
>
&6
;
}
if
${
ac_cv_p
ath_PYTHO
N
+
:
}
false
;
then
:
if
${
ac_cv_p
rog_PYTHON_BI
N
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
$as_echo_n
"(cached) "
>
&6
else
else
case
$PYTHON
in
if
test
-n
"
$PYTHON_BIN
"
;
then
[
\\
/]
*
|
?:[
\\
/]
*
)
ac_cv_prog_PYTHON_BIN
=
"
$PYTHON_BIN
"
# Let the user override the test.
ac_cv_path_PYTHON
=
"
$PYTHON
"
# Let the user override the test with a path.
else
;;
as_save_IFS
=
$IFS
;
IFS
=
$PATH_SEPARATOR
*
)
as_save_IFS
=
$IFS
;
IFS
=
$PATH_SEPARATOR
for
as_dir
in
$PATH
for
as_dir
in
$PATH
do
do
IFS
=
$as_save_IFS
IFS
=
$as_save_IFS
test
-z
"
$as_dir
"
&&
as_dir
=
.
test
-z
"
$as_dir
"
&&
as_dir
=
.
for
ac_exec_ext
in
''
$ac_executable_extensions
;
do
for
ac_exec_ext
in
''
$ac_executable_extensions
;
do
if
as_fn_executable_p
"
$as_dir
/
$ac_word$ac_exec_ext
"
;
then
if
as_fn_executable_p
"
$as_dir
/
$ac_word$ac_exec_ext
"
;
then
ac_cv_p
ath_PYTHON
=
"
$as_dir
/
$ac_word$ac_exec_ext
"
ac_cv_p
rog_PYTHON_BIN
=
"
$ac_prog
"
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: found
$as_dir
/
$ac_word$ac_exec_ext
"
>
&5
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: found
$as_dir
/
$ac_word$ac_exec_ext
"
>
&5
break
2
break
2
fi
fi
...
@@ -6200,184 +6168,163 @@ done
...
@@ -6200,184 +6168,163 @@ done
done
done
IFS
=
$as_save_IFS
IFS
=
$as_save_IFS
;;
esac
fi
fi
PYTHON
=
$ac_cv_path_PYTHON
fi
if
test
-n
"
$PYTHON
"
;
then
PYTHON_BIN
=
$ac_cv_prog_PYTHON_BIN
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$PYTHON
"
>
&5
if
test
-n
"
$PYTHON_BIN
"
;
then
$as_echo
"
$PYTHON
"
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$PYTHON_BIN
"
>
&5
$as_echo
"
$PYTHON_BIN
"
>
&6
;
}
else
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
$as_echo
"no"
>
&6
;
}
fi
fi
fi
test
-n
"
$PYTHON_BIN
"
&&
break
am_display_PYTHON
=
$am_cv_pathless_PYTHON
done
fi
if
test
"
$PYTHON
"
=
:
;
then
as_fn_error
$?
"no suitable Python interpreter found"
"
$LINENO
"
5
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$am_display_PYTHON
version"
>
&5
ax_python_bin
=
$PYTHON_BIN
$as_echo_n
"checking for
$am_display_PYTHON
version... "
>
&6
;
}
if
test
x
$ax_python_bin
!=
x
;
then
if
${
am_cv_python_version
+
:
}
false
;
then
:
as_ac_Lib
=
`
$as_echo
"ac_cv_lib_
$ax_python_bin
''_main"
|
$as_tr_sh
`
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for main in -l
$ax_python_bin
"
>
&5
$as_echo_n
"checking for main in -l
$ax_python_bin
... "
>
&6
;
}
if
eval
\$
{
$as_ac_Lib
+:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
$as_echo_n
"(cached) "
>
&6
else
else
am_cv_python_version
=
`
$PYTHON
-c
"import sys; sys.stdout.write(sys.version[:3])"
`
ac_check_lib_save_LIBS
=
$LIBS
fi
LIBS
=
"-l
$ax_python_bin
$LIBS
"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$am_cv_python_version
"
>
&5
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
$as_echo
"
$am_cv_python_version
"
>
&6
;
}
/* end confdefs.h. */
PYTHON_VERSION
=
$am_cv_python_version
PYTHON_PREFIX
=
'${prefix}'
PYTHON_EXEC_PREFIX
=
'${exec_prefix}'
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
eval
"
$as_ac_Lib
=yes"
else
eval
"
$as_ac_Lib
=no"
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
eval
ac_res
=
\$
$as_ac_Lib
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_res
"
>
&5
$as_echo
"
$ac_res
"
>
&6
;
}
if
eval test
\"
x
\$
"
$as_ac_Lib
"
\"
=
x
"yes"
;
then
:
ax_python_lib
=
$ax_python_bin
else
ax_python_lib
=
no
fi
if
test
x
$ax_python_lib
==
xno
;
then
as_ac_Lib
=
`
$as_echo
"ac_cv_lib_
${
ax_python_bin
}
m''_main"
|
$as_tr_sh
`
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for main in -l
${
ax_python_bin
}
m"
>
&5
$as_echo_n
"checking for main in -l
${
ax_python_bin
}
m... "
>
&6
;
}
if
eval
\$
{
$as_ac_Lib
+:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-l
${
ax_python_bin
}
m
$LIBS
"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$am_display_PYTHON
platform"
>
&5
int
$as_echo_n
"checking for
$am_display_PYTHON
platform... "
>
&6
;
}
main ()
if
${
am_cv_python_platform
+
:
}
false
;
then
:
{
$as_echo_n
"(cached) "
>
&6
return main ();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
eval
"
$as_ac_Lib
=yes"
else
else
am_cv_python_platform
=
`
$PYTHON
-c
"import sys; sys.stdout.write(sys.platform)"
`
eval
"
$as_ac_Lib
=no"
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$am_cv_python_platform
"
>
&5
rm
-f
core conftest.err conftest.
$ac_objext
\
$as_echo
"
$am_cv_python_platform
"
>
&6
;
}
conftest
$ac_exeext
conftest.
$ac_ext
PYTHON_PLATFORM
=
$am_cv_python_platform
LIBS
=
$ac_check_lib_save_LIBS
fi
eval
ac_res
=
\$
$as_ac_Lib
# Just factor out some code duplication.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_res
"
>
&5
am_python_setup_sysconfig
=
"
\
$as_echo
"
$ac_res
"
>
&6
;
}
import sys
if
eval test
\"
x
\$
"
$as_ac_Lib
"
\"
=
x
"yes"
;
then
:
# Prefer sysconfig over distutils.sysconfig, for better compatibility
ax_python_lib
=
${
ax_python_bin
}
m
# with python 3.x. See automake bug#10227.
try:
import sysconfig
except ImportError:
can_use_sysconfig = 0
else:
can_use_sysconfig = 1
# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
# <https://github.com/pypa/virtualenv/issues/118>
try:
from platform import python_implementation
if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
can_use_sysconfig = 0
except ImportError:
pass"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$am_display_PYTHON
script directory"
>
&5
$as_echo_n
"checking for
$am_display_PYTHON
script directory... "
>
&6
;
}
if
${
am_cv_python_pythondir
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
else
if
test
"x
$prefix
"
=
xNONE
ax_python_lib
=
no
then
am_py_prefix
=
$ac_default_prefix
else
am_py_prefix
=
$prefix
fi
am_cv_python_pythondir
=
`
$PYTHON
-c
"
$am_python_setup_sysconfig
if can_use_sysconfig:
sitedir = sysconfig.get_path('purelib', vars={'base':'
$am_py_prefix
'})
else:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(0, 0, prefix='
$am_py_prefix
')
sys.stdout.write(sitedir)"
`
case
$am_cv_python_pythondir
in
$am_py_prefix
*
)
am__strip_prefix
=
`
echo
"
$am_py_prefix
"
|
sed
's|.|.|g'
`
am_cv_python_pythondir
=
`
echo
"
$am_cv_python_pythondir
"
|
sed
"s,^
$am__strip_prefix
,
$PYTHON_PREFIX
,"
`
;;
*
)
case
$am_py_prefix
in
/usr|/System
*
)
;;
*
)
am_cv_python_pythondir
=
$PYTHON_PREFIX
/lib/python
$PYTHON_VERSION
/site-packages
;;
esac
;;
esac
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$am_cv_python_pythondir
"
>
&5
$as_echo
"
$am_cv_python_pythondir
"
>
&6
;
}
pythondir
=
$am_cv_python_pythondir
fi
if
test
x
$ax_python_lib
!=
xno
;
then
ax_python_header
=
`
$ax_python_bin
-c
"from distutils.sysconfig import *; print(get_config_var('CONFINCLUDEPY'))"
`
if
test
x
$ax_python_header
!=
x
;
then
break
;
fi
fi
fi
done
if
test
x
$ax_python_bin
=
x
;
then
ax_python_bin
=
no
fi
if
test
x
$ax_python_header
=
x
;
then
ax_python_header
=
no
fi
if
test
x
$ax_python_lib
=
x
;
then
ax_python_lib
=
no
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: results of the Python check:"
>
&5
$as_echo
" results of the Python check:"
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: Binary:
$ax_python_bin
"
>
&5
$as_echo
" Binary:
$ax_python_bin
"
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: Library:
$ax_python_lib
"
>
&5
$as_echo
" Library:
$ax_python_lib
"
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: Include Dir:
$ax_python_header
"
>
&5
$as_echo
" Include Dir:
$ax_python_header
"
>
&6
;
}
pkgpythondir
=
\$
{
pythondir
}
/
$PACKAGE
PYTHON_FOUND
=
yes
if
test
x
$ax_python_header
!=
xno
;
then
PYTHON_INCLUDE_DIR
=
$ax_python_header
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$am_display_PYTHON
extension module directory"
>
&5
$as_echo_n
"checking for
$am_display_PYTHON
extension module directory... "
>
&6
;
}
if
${
am_cv_python_pyexecdir
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
else
if
test
"x
$exec_prefix
"
=
xNONE
PYTHON_FOUND
=
no
then
am_py_exec_prefix
=
$am_py_prefix
else
am_py_exec_prefix
=
$exec_prefix
fi
am_cv_python_pyexecdir
=
`
$PYTHON
-c
"
$am_python_setup_sysconfig
if can_use_sysconfig:
sitedir = sysconfig.get_path('platlib', vars={'platbase':'
$am_py_prefix
'})
else:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(1, 0, prefix='
$am_py_prefix
')
sys.stdout.write(sitedir)"
`
case
$am_cv_python_pyexecdir
in
$am_py_exec_prefix
*
)
am__strip_prefix
=
`
echo
"
$am_py_exec_prefix
"
|
sed
's|.|.|g'
`
am_cv_python_pyexecdir
=
`
echo
"
$am_cv_python_pyexecdir
"
|
sed
"s,^
$am__strip_prefix
,
$PYTHON_EXEC_PREFIX
,"
`
;;
*
)
case
$am_py_exec_prefix
in
/usr|/System
*
)
;;
*
)
am_cv_python_pyexecdir
=
$PYTHON_EXEC_PREFIX
/lib/python
$PYTHON_VERSION
/site-packages
;;
esac
;;
esac
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$am_cv_python_pyexecdir
"
>
&5
$as_echo
"
$am_cv_python_pyexecdir
"
>
&6
;
}
pyexecdir
=
$am_cv_python_pyexecdir
if
test
x
$ax_python_lib
!=
xno
;
then
PYTHON_LIB
=
$ax_python_lib
else
PYTHON_FOUND
=
no
fi
pkgpyexecdir
=
\$
{
pyexecdir
}
/
$PACKAGE
fi
if
test
$PYTHON_FOUND
=
no
;
then
as_fn_error
$?
"No supported python lib version found. Try --disable-python"
"
$LINENO
"
5
else
PY_PREFIX
=
`
$PYTHON
-c
'import sys ; print sys.prefix'
`
EXTRA_LIBS
=
"
${
EXTRA_LIBS
}
-l
${
PYTHON_LIB
}
"
CPPFLAGS
=
"
${
CPPFLAGS
}
-I
${
PYTHON_INCLUDE_DIR
}
"
$as_echo
"#define USE_PYTHON 1"
>>
confdefs.h
EXTRA_LIBS
=
"
${
EXTRA_LIBS
}
-l
${
PYTHON_LIB
}
"
fi
CPPFLAGS
=
"
${
CPPFLAGS
}
-I
${
PYTHON_INCLUDE_DIR
}
"
fi
$as_echo
"#define USE_PYTHON 1"
>>
confdefs.h
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for libjansson"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for libjansson"
>
&5
$as_echo_n
"checking for libjansson... "
>
&6
;
}
$as_echo_n
"checking for libjansson... "
>
&6
;
}
...
@@ -6499,6 +6446,7 @@ $as_echo "#define USE_JSON 1" >>confdefs.h
...
@@ -6499,6 +6446,7 @@ $as_echo "#define USE_JSON 1" >>confdefs.h
fi
fi
#check for custom prog name
#check for custom prog name
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking progname"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking progname"
>
&5
$as_echo_n
"checking progname... "
>
&6
;
}
$as_echo_n
"checking progname... "
>
&6
;
}
...
...
configure.ac
View file @
77081999
...
@@ -94,20 +94,45 @@ AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua],
...
@@ -94,20 +94,45 @@ AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua],
AC_MSG_ERROR([No lua found. Try --disable-liblua])
AC_MSG_ERROR([No lua found. Try --disable-liblua])
])
])
])
])
AC_MSG_CHECKING([for python])
AC_ARG_ENABLE(python,[--enable-python/--disable-python],
AC_ARG_ENABLE(python,[--enable-python/--disable-python],
[
[
AX_PYTHON()
if test "x$enableval" = "xno" ; then
dnl python checks (you can change the required python version bellow)
AC_MSG_RESULT([disabled])
AM_PATH_PYTHON(2.7.0)
else
PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
AC_MSG_RESULT([enabled])
AC_SUBST([PYTHON_LIBS])
AC_SUBST([PYTHON_CFLAGS])
AX_PYTHON()
EXTRA_LIBS="${EXTRA_LIBS} -l${PYTHON_LIB}"
AC_SUBST([PYTHON_FOUND])
CPPFLAGS="${CPPFLAGS} -I${PYTHON_INCLUDE_DIR}"
if test $PYTHON_FOUND = no ; then
AC_MSG_ERROR([No supported python lib version found. Try --disable-python])
AC_DEFINE(USE_PYTHON,1,[use python])
else
AC_SUBST([PYTHON_LIBS])
AC_SUBST([PYTHON_CFLAGS])
EXTRA_LIBS="${EXTRA_LIBS} -l${PYTHON_LIB}"
CPPFLAGS="${CPPFLAGS} -I${PYTHON_INCLUDE_DIR}"
AC_DEFINE(USE_PYTHON,1,[use python])
fi
fi
],[
AC_MSG_RESULT([enabled])
AX_PYTHON()
AC_SUBST([PYTHON_FOUND])
if test $PYTHON_FOUND = no ; then
AC_MSG_ERROR([No supported python lib version found. Try --disable-python])
else
AC_SUBST([PYTHON_LIBS])
AC_SUBST([PYTHON_CFLAGS])
EXTRA_LIBS="${EXTRA_LIBS} -l${PYTHON_LIB}"
CPPFLAGS="${CPPFLAGS} -I${PYTHON_INCLUDE_DIR}"
AC_DEFINE(USE_PYTHON,1,[use python])
fi
])
])
AC_MSG_CHECKING([for libjansson])
AC_MSG_CHECKING([for libjansson])
AC_ARG_ENABLE(json,[--enable-json/--disable-json],
AC_ARG_ENABLE(json,[--enable-json/--disable-json],
[
[
...
@@ -124,20 +149,6 @@ AC_ARG_ENABLE(json,[--enable-json/--disable-json],
...
@@ -124,20 +149,6 @@ AC_ARG_ENABLE(json,[--enable-json/--disable-json],
AC_DEFINE(USE_JSON,1,[use json])
AC_DEFINE(USE_JSON,1,[use json])
])
])
AC_ARG_ENABLE(python,[--enable-python/--disable-python],
[
AX_PYTHON()
dnl python checks (you can change the required python version bellow)
AM_PATH_PYTHON(2.7.0)
PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
AC_SUBST([PYTHON_LIBS])
AC_SUBST([PYTHON_CFLAGS])
EXTRA_LIBS="${EXTRA_LIBS} -l${PYTHON_LIB}"
CPPFLAGS="${CPPFLAGS} -I${PYTHON_INCLUDE_DIR}"
AC_DEFINE(USE_PYTHON,1,[use python])
])
#check for custom prog name
#check for custom prog name
AC_MSG_CHECKING([progname])
AC_MSG_CHECKING([progname])
AC_ARG_WITH(progname,[--with-progname=<name>],
AC_ARG_WITH(progname,[--with-progname=<name>],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment