From b12193e68f822203ac01ea81055aebfb45b82544 Mon Sep 17 00:00:00 2001 From: Christophe Nowicki Date: Thu, 5 Aug 2004 15:26:38 +0000 Subject: automake/autoconf support for the php binding --- php/Makefile.am | 29 +++++++++++++++++++++++++++++ php/environs/Makefile.am | 15 +++++++++++++++ php/environs/lasso_federation.c | 4 ++-- php/environs/lasso_identity.c | 31 ++----------------------------- php/environs/lasso_login.c | 4 ++-- php/environs/lasso_profile.c | 4 ++-- php/environs/lasso_server.c | 4 ++-- php/environs/lasso_session.c | 4 ++-- php/lasso.c | 3 +-- php/php_lasso.h | 1 - php/tests/Makefile.am | 0 php/xml/Makefile.am | 15 +++++++++++++++ php/xml/lasso_lib_authn_request.c | 4 ++-- 13 files changed, 74 insertions(+), 44 deletions(-) create mode 100644 php/Makefile.am create mode 100644 php/environs/Makefile.am create mode 100644 php/tests/Makefile.am create mode 100644 php/xml/Makefile.am (limited to 'php') diff --git a/php/Makefile.am b/php/Makefile.am new file mode 100644 index 00000000..04a85472 --- /dev/null +++ b/php/Makefile.am @@ -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) diff --git a/php/environs/Makefile.am b/php/environs/Makefile.am new file mode 100644 index 00000000..dcc37073 --- /dev/null +++ b/php/environs/Makefile.am @@ -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) diff --git a/php/environs/lasso_federation.c b/php/environs/lasso_federation.c index ba461f68..6776476a 100644 --- a/php/environs/lasso_federation.c +++ b/php/environs/lasso_federation.c @@ -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" diff --git a/php/environs/lasso_identity.c b/php/environs/lasso_identity.c index d61b924b..75336a33 100644 --- a/php/environs/lasso_identity.c +++ b/php/environs/lasso_identity.c @@ -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); -} -/* }}} */ diff --git a/php/environs/lasso_login.c b/php/environs/lasso_login.c index cebaca3f..39523215 100644 --- a/php/environs/lasso_login.c +++ b/php/environs/lasso_login.c @@ -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" diff --git a/php/environs/lasso_profile.c b/php/environs/lasso_profile.c index 9f835cd8..5dd2f37c 100644 --- a/php/environs/lasso_profile.c +++ b/php/environs/lasso_profile.c @@ -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" diff --git a/php/environs/lasso_server.c b/php/environs/lasso_server.c index 2ec37d48..d262715c 100644 --- a/php/environs/lasso_server.c +++ b/php/environs/lasso_server.c @@ -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" diff --git a/php/environs/lasso_session.c b/php/environs/lasso_session.c index 38787897..c42228f3 100644 --- a/php/environs/lasso_session.c +++ b/php/environs/lasso_session.c @@ -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" diff --git a/php/lasso.c b/php/lasso.c index cd413afe..c2fa86be 100644 --- a/php/lasso.c +++ b/php/lasso.c @@ -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 */ diff --git a/php/php_lasso.h b/php/php_lasso.h index 4e55ef5b..0b6d192d 100644 --- a/php/php_lasso.h +++ b/php/php_lasso.h @@ -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); diff --git a/php/tests/Makefile.am b/php/tests/Makefile.am new file mode 100644 index 00000000..e69de29b diff --git a/php/xml/Makefile.am b/php/xml/Makefile.am new file mode 100644 index 00000000..ff3def57 --- /dev/null +++ b/php/xml/Makefile.am @@ -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 = diff --git a/php/xml/lasso_lib_authn_request.c b/php/xml/lasso_lib_authn_request.c index 64810e40..69a8a856 100644 --- a/php/xml/lasso_lib_authn_request.c +++ b/php/xml/lasso_lib_authn_request.c @@ -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" -- cgit