automake/autoconf support for the php binding
This commit is contained in:
parent
8ecc49afbd
commit
b12193e68f
|
@ -4,8 +4,11 @@ endif
|
|||
if JAVA_ENABLED
|
||||
JAVA_SD = java
|
||||
endif
|
||||
if PHP_ENABLED
|
||||
PHP_SD = php
|
||||
endif
|
||||
|
||||
SUBDIRS = lasso docs $(PYTHON_SD) $(JAVA_SD) tests
|
||||
SUBDIRS = lasso docs $(PHP_SD) $(PYTHON_SD) $(JAVA_SD) tests
|
||||
|
||||
ABS_BUILDDIR = $(shell pwd)
|
||||
|
||||
|
|
56
configure.ac
56
configure.ac
|
@ -73,7 +73,7 @@ esac
|
|||
|
||||
|
||||
dnl ==========================================================================
|
||||
dnl Version
|
||||
dnl Version Super.Size.Me.L
|
||||
dnl ==========================================================================
|
||||
|
||||
changequote(<<, >>)dnl
|
||||
|
@ -173,6 +173,7 @@ AC_CHECK_PROGS(JAVAC, gcj javac)
|
|||
AC_CHECK_PROGS(JAVAH, gcjh javah)
|
||||
AC_CHECK_PROGS(JAR, fastjar jar)
|
||||
AC_CHECK_PROGS(PYTHON, python)
|
||||
AC_CHECK_PROGS(PHP, php)
|
||||
AC_CHECK_PROGS(SWIG, swig)
|
||||
AC_CHECK_PROGS(PKG_CONFIG, pkg-config)
|
||||
|
||||
|
@ -271,6 +272,7 @@ if test "X$with_python" != Xno; then
|
|||
fi
|
||||
|
||||
|
||||
|
||||
dnl need to change quotes to allow square brackets
|
||||
changequote(<<, >>)dnl
|
||||
PYTHON_VERSION=`$PYTHON -c 'import sys; print sys.version[:3]' 2>/dev/null`
|
||||
|
@ -313,6 +315,49 @@ AM_CONDITIONAL([PYTHON_ENABLED],[test "x$with_python" = "xyes"])
|
|||
AC_MSG_RESULT($with_python)
|
||||
AC_SUBST(PYTHON_VERSION)
|
||||
|
||||
AC_CHECK_PROG(PHP_CONFIG, php-config, php-config)
|
||||
if test "X$PHP_CONFIG" != X ; then
|
||||
|
||||
PHP_INCLUDES=`$PHP_CONFIG --includes`
|
||||
PHP_LDFLAGS=`$PHP_CONFIG --ldflags`
|
||||
PHP_LIBS=`$PHP_CONFIG --libs`
|
||||
PHP_EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
|
||||
else
|
||||
# This allows 'make clean' in the python directory to work when
|
||||
# php isn't available
|
||||
PHP=:
|
||||
PHP_INCLUDES=
|
||||
PHP_LDFLAGS=
|
||||
PHP_LIBS=
|
||||
PHP_EXTENSION_DIR=
|
||||
fi
|
||||
AC_SUBST(PHP_INCLUDES)
|
||||
AC_SUBST(PHP_LDFLAGS)
|
||||
AC_SUBST(PHP_LIBS)
|
||||
AC_SUBST(PHP_EXTENSION_DIR)
|
||||
|
||||
AC_ARG_WITH(php, [ --with-php(=PHP) Enable the PHP interface], with_php="$withval", with_php="no")
|
||||
AC_MSG_CHECKING(Enable PHP API)
|
||||
if test "X$with_php" != Xno ; then
|
||||
if test "X$with_php" != Xyes; then
|
||||
PHP=$with_php
|
||||
fi
|
||||
with_php=yes
|
||||
fi
|
||||
|
||||
PHP_VERSION=`php-config --version 2>/dev/null`
|
||||
if test "X$PHP_VERSION" != X; then
|
||||
languages_available="$languages_available php($PHP_VERSION)"
|
||||
if test $with_php = yes; then
|
||||
languages="$languages php"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($with_php)
|
||||
AM_CONDITIONAL([PHP_ENABLED],[test "x$with_php" = "xyes"])
|
||||
AC_SUBST(PHP_VERSION)
|
||||
|
||||
SD_LANG="$languages"
|
||||
AC_SUBST(SD_LANG)
|
||||
|
||||
dnl ==========================================================================
|
||||
dnl Test suite (requires check)
|
||||
|
@ -437,7 +482,7 @@ if test "z$enable_pedantic" = "zyes" ; then
|
|||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
lasso_
|
||||
dnl ==========================================================================
|
||||
dnl Static linking
|
||||
dnl ==========================================================================
|
||||
|
@ -514,6 +559,10 @@ python/protocols/Makefile
|
|||
python/protocols/elements/Makefile
|
||||
python/tests/Makefile
|
||||
python/xml/Makefile
|
||||
php/Makefile
|
||||
php/environs/Makefile
|
||||
php/xml/Makefile
|
||||
php/tests/Makefile
|
||||
tests/Makefile
|
||||
java/Makefile]
|
||||
dnl [java/coldfusion/Makefile]
|
||||
|
@ -547,6 +596,9 @@ Optionals builds
|
|||
Python binding:
|
||||
${with_python}
|
||||
|
||||
PHP binding:
|
||||
${with_php}
|
||||
|
||||
Build Java binding:
|
||||
${with_java}
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
SUBDIRS = environs tests xml
|
||||
|
||||
PHP_PACKAGE=lasso
|
||||
|
||||
liblasso_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/lasso/.libs $(PHP_LDFLAGS)
|
||||
|
||||
INCLUDES = \
|
||||
-DPACKAGE=\"@PACKAGE@\" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/lasso \
|
||||
$(LASSO_DEFINES) \
|
||||
$(LASSO_CFLAGS) \
|
||||
$(PHP_INCLUDES) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
mylibs = $(top_builddir)/lasso/liblasso.la
|
||||
|
||||
LASSOSOURCES = lasso.c lasso.h php_lasso.h
|
||||
|
||||
lib_LTLIBRARIES = liblasso.la \
|
||||
$(NULL)
|
||||
|
||||
liblasso_la_SOURCES = $(LASSOSOURCES)
|
||||
liblasso_la_LIBADD = $(mylibs) \
|
||||
./environs/libenvirons.a \
|
||||
./xml/libxml.a \
|
||||
$(PHP_LIBS) \
|
||||
$(NULL)
|
|
@ -0,0 +1,15 @@
|
|||
INCLUDES = \
|
||||
-DPACKAGE=\"@PACKAGE@\" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/lasso \
|
||||
$(LASSO_DEFINES) \
|
||||
$(LASSO_CFLAGS) \
|
||||
$(PHP_INCLUDES)
|
||||
|
||||
|
||||
ENVSOURCES = lasso_identity.c lasso_profile.c lasso_session.c lasso_federation.c lasso_login.c lasso_server.c
|
||||
|
||||
noinst_LIBRARIES = libenvirons.a
|
||||
libenvirons_a_SOURCES = $(ENVSOURCES)
|
||||
|
||||
EXTRA_DIST = $(ENVSOURCES)
|
|
@ -22,13 +22,13 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
||||
|
@ -98,30 +98,3 @@ PHP_FUNCTION(lasso_identity_dump) {
|
|||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto resource lasso_identity_get_next_providerID(resource identity) */
|
||||
PHP_FUNCTION(lasso_identity_get_next_providerid)
|
||||
{
|
||||
LassoIdentity *identity;
|
||||
char *providerID;
|
||||
zval *param;
|
||||
|
||||
zend_printf("DEBUG: lasso_identity_get_next_providerID\n");
|
||||
|
||||
int num_args;
|
||||
|
||||
if ((num_args = ZEND_NUM_ARGS()) != 1)
|
||||
WRONG_PARAM_COUNT
|
||||
|
||||
if (zend_parse_parameters(num_args TSRMLS_CC, "z", ¶m) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(identity, LassoIdentity *, ¶m, -1, le_lassoidentity_name, le_lassoidentity);
|
||||
|
||||
zend_printf("DEBUG: identity at 0x%p\n", identity);
|
||||
|
||||
providerID = (char *) lasso_identity_get_next_providerID(identity);
|
||||
RETURN_STRING(providerID, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
|
@ -74,7 +74,6 @@ function_entry lasso_functions[] = {
|
|||
/* lasso_user.c */
|
||||
PHP_FE(lasso_identity_new, NULL)
|
||||
PHP_FE(lasso_identity_dump, NULL)
|
||||
PHP_FE(lasso_identity_get_next_providerid, NULL)
|
||||
PHP_FE(lasso_identity_destroy, NULL)
|
||||
|
||||
/* lasso_profile_.c */
|
||||
|
|
|
@ -71,7 +71,6 @@ PHP_FUNCTION(lasso_login_build_authn_request_msg);
|
|||
|
||||
/* lasso_user.c */
|
||||
PHP_FUNCTION(lasso_identity_new);
|
||||
PHP_FUNCTION(lasso_identity_get_next_providerid);
|
||||
PHP_FUNCTION(lasso_identity_dump);
|
||||
PHP_FUNCTION(lasso_identity_destroy);
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
INCLUDES = \
|
||||
-DPACKAGE=\"@PACKAGE@\" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/lasso \
|
||||
$(LASSO_DEFINES) \
|
||||
$(LASSO_CFLAGS) \
|
||||
$(PHP_INCLUDES)
|
||||
|
||||
|
||||
XMLSOURCES = lasso_lib_authn_request.c
|
||||
|
||||
noinst_LIBRARIES = libxml.a
|
||||
libxml_a_SOURCES = $(XMLSOURCES)
|
||||
|
||||
EXTRA_DIST =
|
|
@ -23,13 +23,13 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "lasso_config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_lasso.h"
|
||||
#include "../php_lasso.h"
|
||||
|
||||
#include "lasso.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue