-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
--- configure.ac.back 2015-10-24 13:39:25.273440670 +0200 | ||
+++ configure.ac 2015-10-24 13:44:41.635374294 +0200 | ||
@@ -61,93 +61,43 @@ | ||
],[ | ||
]) | ||
|
||
+# liblua is required | ||
AC_MSG_CHECKING([for liblua]) | ||
-AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua], | ||
- [ | ||
- if test "x$enableval" = "xno" ; then | ||
- AC_MSG_RESULT([disabled]) | ||
- else | ||
- AC_MSG_RESULT([enabled]) | ||
- AX_PROG_LUA([],[], | ||
- [ | ||
- AX_LUA_HEADERS([],[AC_MSG_ERROR([No lua headers found. Try --disable-liblua])]) | ||
- AX_LUA_LIBS([],[AC_MSG_ERROR([No lua libs found. Try --disable-liblua])]) | ||
- [EXTRA_LIBS="${EXTRA_LIBS} ${LUA_LIB}" ; ] | ||
- [CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ; ] | ||
- AC_DEFINE(USE_LUA,1,[use lua]) | ||
- ], | ||
- [ | ||
- AC_MSG_ERROR([No lua found. Try --disable-liblua]) | ||
- ]) | ||
- fi | ||
- ],[ | ||
- AC_MSG_RESULT([enabled]) | ||
- AX_PROG_LUA([],[], | ||
- [ | ||
- AX_LUA_HEADERS([],[AC_MSG_ERROR([No lua headers found. Try --disable-liblua])]) | ||
- AX_LUA_LIBS([],[AC_MSG_ERROR([No lua libs found. Try --disable-liblua])]) | ||
- [EXTRA_LIBS="${EXTRA_LIBS} ${LUA_LIB}" ; ] | ||
- [CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ; ] | ||
- AC_DEFINE(USE_LUA,1,[use lua]) | ||
- ], | ||
- [ | ||
- AC_MSG_ERROR([No lua found. Try --disable-liblua]) | ||
- ]) | ||
- ]) | ||
- | ||
-AC_MSG_CHECKING([for python]) | ||
-AC_ARG_ENABLE(python,[--enable-python/--disable-python], | ||
+AC_MSG_RESULT([enabled]) | ||
+AX_PROG_LUA([],[], | ||
[ | ||
- if test "x$enableval" = "xno" ; then | ||
- AC_MSG_RESULT([disabled]) | ||
- else | ||
- 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 | ||
- 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 | ||
+ AX_LUA_HEADERS([],[AC_MSG_ERROR([No lua headers found. Install them])]) | ||
+ AX_LUA_LIBS([],[AC_MSG_ERROR([No lua libs found. Install them])]) | ||
+ [EXTRA_LIBS="${EXTRA_LIBS} ${LUA_LIB}" ; ] | ||
+ [CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ; ] | ||
+ AC_DEFINE(USE_LUA,1,[use lua]) | ||
+ ], | ||
+ [ | ||
+ AC_MSG_ERROR([No lua found. Install lua]) | ||
]) | ||
|
||
+# Optional | ||
+AC_MSG_CHECKING([for python]) | ||
+AX_PYTHON() | ||
+AC_SUBST([PYTHON_FOUND]) | ||
+if test $PYTHON_FOUND = no ; then | ||
+ AC_MSG_RESULT([disabled]) | ||
+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 | ||
|
||
- | ||
+# Optional | ||
AC_MSG_CHECKING([for libjansson]) | ||
-AC_ARG_ENABLE(json,[--enable-json/--disable-json], | ||
- [ | ||
- if test "x$enableval" = "xno" ; then | ||
- AC_MSG_RESULT([disabled]) | ||
- else | ||
- AC_MSG_RESULT([enabled]) | ||
- AC_CHECK_LIB([jansson],[json_array_set_new],[],AC_MSG_ERROR([No libjansson found. Try --disable-json])) | ||
- AC_DEFINE(USE_JSON,1,[use json]) | ||
- fi | ||
- ],[ | ||
+AC_CHECK_LIB([jansson],[json_array_set_new], | ||
+ [ | ||
AC_MSG_RESULT([enabled]) | ||
- AC_CHECK_LIB([jansson],[json_array_set_new],[],AC_MSG_ERROR([No libjansson found. Try --disable-json])) | ||
AC_DEFINE(USE_JSON,1,[use json]) | ||
- ]) | ||
+ ], | ||
+ [AC_MSG_RESULT([disabled])]) | ||
|
||
#check for custom prog name | ||
AC_MSG_CHECKING([progname]) | ||
@@ -193,4 +143,3 @@ | ||
AC_SUBST(EXTRA_LIBS) | ||
AC_CONFIG_FILES([Makefile]) | ||
AC_OUTPUT | ||
- |