Review Board 1.7.22


PHP binding for Qpid Messaging API

Review Request #462 - Created March 3, 2011 and updated

Paul Colby
QPID-3027
Reviewers
qpid
qpid
A SWIG-based PHP binding for the Qpid Messaging API.

The SWIG-based binding itself is complete, and working (hence needing review).

This diff includes integration with Qpid's autoconf build system.  I've only just begun learning autoconf / automake, so the build integration definitely needs review too :)

 

Diff revision 1

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

1 2 3
1 2 3

  1. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/configure.ac: Loading...
  2. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/swig_php_typemaps.i: Loading...
  3. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/Makefile.am: Loading...
  4. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/examples/php/cli/list_agents.php: Loading...
  5. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/Makefile.am: Loading...
  6. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/php.i: Loading...
  7. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/Makefile.am: Loading...
  8. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/client.php: Loading...
  9. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/hello_world.php: Loading...
  10. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_receiver.php: Loading...
  11. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_sender.php: Loading...
  12. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/server.php: Loading...
  13. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/web/hello_world.php: Loading...
  14. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/Makefile.am: Loading...
  15. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/php.i: Loading...
  16. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/phpinfo.i: Loading...
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/configure.ac
Revision 1086164 New Change
[20] 225 lines
[+20]
226
    AC_SUBST(PYTHON_LIBS)
226
    AC_SUBST(PYTHON_LIBS)
227
    AC_MSG_RESULT([$PYTHON_LIBS])
227
    AC_MSG_RESULT([$PYTHON_LIBS])
228
fi
228
fi
229
AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test -f $PYTHON_INC/Python.h && test -n "$SWIG"])
229
AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test -f $PYTHON_INC/Python.h && test -n "$SWIG"])
230

    
   
230

   

    
   
231
# PHP bindings.

    
   
232

   

    
   
233
AC_ARG_VAR(PHP_VERSION, [PHP version number])

    
   
234
AC_ARG_VAR(PHP_DEV_INCLUDES, [List of PHP development includes])

    
   
235
AC_ARG_VAR(PHP_EXTENSION_DIR, [Directory to install loadable PHP extension to])

    
   
236
AC_ARG_VAR(PHP_INCLUDE_DIR, [Directory to install static PHP extension header to])

    
   
237
AC_ARG_VAR(PHP_WRAPPER_DIR, [Directory to install PHP class wrapper to])

    
   
238
AC_ARG_VAR(PHP_CONFIG_DIR,  [Directory to install PHP ini file to])

    
   
239

   

    
   
240
AC_CHECK_PROG([PHP], [php], [php])

    
   
241
AC_CHECK_PROG([PHP_CONFIG], [php-config], [php-config])

    
   
242

   

    
   
243
# Get details from $(PHP_CONFIG), falling back to $(PHP) if possible.

    
   
244
if test -n "$PHP_CONFIG" ; then

    
   
245
    if test -z "$PHP_VERSION" ; then

    
   
246
        AC_MSG_CHECKING([for PHP version number])

    
   
247
        PHP_VERSION=`"$PHP_CONFIG" --vernum`

    
   
248
        AC_SUBST(PHP_VERSION)

    
   
249
        AC_MSG_RESULT([$PHP_VERSION])

    
   
250
    fi

    
   
251

   

    
   
252
    if test -z "$PHP_DEV_INCLUDES" ; then

    
   
253
        AC_MSG_CHECKING([for PHP development includes])

    
   
254
        PHP_DEV_INCLUDES=`"$PHP_CONFIG" --includes`

    
   
255
        AC_SUBST(PHP_DEV_INCLUDES)

    
   
256
        AC_MSG_RESULT([$PHP_DEV_INCLUDES])

    
   
257
    fi

    
   
258

   

    
   
259
    if test -z "$PHP_EXTENSION_DIR" ; then

    
   
260
        AC_MSG_CHECKING([for directory to install loadable PHP extension to])

    
   
261
        PHP_EXTENSION_DIR=`$PHP_CONFIG --extension-dir`

    
   
262
        if test -z "$PHP_EXTENSION_DIR" && test -n "$PHP" ; then

    
   
263
            PHP_EXTENSION_DIR=`"$PHP" -r 'phpinfo();' | "$SED" -ne 's/^extension_dir\s\+=>\s\+\(.*\)\s\+=>.*$/\1/p'`

    
   
264
        fi

    
   
265
        AC_SUBST(PHP_EXTENSION_DIR)

    
   
266
        AC_MSG_RESULT([$PHP_EXTENSION_DIR])

    
   
267
    fi

    
   
268

   

    
   
269
    if test -z "$PHP_INCLUDE_DIR" ; then

    
   
270
        AC_MSG_CHECKING([for directory to install static PHP extension header to])

    
   
271
        PHP_INCLUDE_DIR=`"$PHP_CONFIG" --include-dir`

    
   
272
        AC_SUBST(PHP_INCLUE_DIR)

    
   
273
        AC_MSG_RESULT([$PHP_INCLUDE_DIR])

    
   
274
    fi

    
   
275

   

    
   
276
    if test -z "$PHP_CONFIG_DIR" ; then

    
   
277
        AC_MSG_CHECKING([for directory to install PHP ini file to])

    
   
278
        PHP_CONFIG_DIR=`"$PHP_CONFIG" --configure-options | "$SED" -ne 's/^.*--with-config-file-scan-dir=\([[^ ]]*\).*/\1/p'`

    
   
279
        AC_SUBST(PHP_INCLUE_DIR)

    
   
280
        AC_MSG_RESULT([$PHP_INCLUDE_DIR])

    
   
281
    fi

    
   
282
fi

    
   
283

   

    
   
284
# Get details only available from $(PHP), and not $(PHP_CONFIG).

    
   
285
if test -n "$PHP" ; then

    
   
286
    if test -z "$PHP_WRAPPER_DIR" ; then

    
   
287
        AC_MSG_CHECKING([for directory to install PHP class wrapper to])

    
   
288
        PHP_WRAPPER_DIR=`"$PHP" -r 'print get_include_path();' | "$SED" -ne 's/\(\.:\)\?\(\/[[^:]]*\).*/\2/p'`

    
   
289
        AC_SUBST(PHP_WRAPPER_DIR)

    
   
290
        AC_MSG_RESULT([$PHP_WRAPPER_DIR])

    
   
291
    fi

    
   
292
fi

    
   
293

   

    
   
294
AM_CONDITIONAL([HAVE_PHP_DEVEL], [test -n "$PHP_DEV_INCLUDES" && test -n "$SWIG"])

    
   
295
AM_CONDITIONAL([HAVE_PHP_DYNAMIC_INSTALL], [test -n "$PHP_EXTENSION_DIR" && test -n "$PHP_CONFIG_DIR"])

    
   
296
AM_CONDITIONAL([HAVE_PHP_STATIC_INSTALL],  [test -n "$PHP_INCLUDE_DIR"])

    
   
297
AM_CONDITIONAL([HAVE_PHP_WRAPPER_INSTALL], [test -n "$PHP_WRAPPER_DIR"])
231

    
   
298

   
232
# Perl bindings:
299
# Perl bindings:
233

    
   
300

   
234
AC_CHECK_PROG([PERL], [perl], [perl])
301
AC_CHECK_PROG([PERL], [perl], [perl])
235
if test -n "$PERL"; then
302
if test -n "$PERL"; then
[+20] [20] 300 lines
[+20]
536
  examples/old_api/tradedemo/Makefile
603
  examples/old_api/tradedemo/Makefile
537
  examples/messaging/Makefile
604
  examples/messaging/Makefile
538
  bindings/qpid/Makefile
605
  bindings/qpid/Makefile
539
  bindings/qpid/ruby/Makefile
606
  bindings/qpid/ruby/Makefile
540
  bindings/qpid/python/Makefile
607
  bindings/qpid/python/Makefile

    
   
608
  bindings/qpid/php/Makefile
541
  bindings/qpid/perl/Makefile
609
  bindings/qpid/perl/Makefile
542
  bindings/qpid/dotnet/Makefile
610
  bindings/qpid/dotnet/Makefile
543
  bindings/qmf/Makefile
611
  bindings/qmf/Makefile
544
  bindings/qmf/ruby/Makefile
612
  bindings/qmf/ruby/Makefile
545
  bindings/qmf/python/Makefile
613
  bindings/qmf/python/Makefile
546
  bindings/qmf/tests/Makefile
614
  bindings/qmf/tests/Makefile
547
  bindings/qmf2/Makefile
615
  bindings/qmf2/Makefile
548
  bindings/qmf2/ruby/Makefile
616
  bindings/qmf2/ruby/Makefile
549
  bindings/qmf2/python/Makefile
617
  bindings/qmf2/python/Makefile

    
   
618
  bindings/qmf2/php/Makefile
550
  bindings/qmf2/examples/cpp/Makefile
619
  bindings/qmf2/examples/cpp/Makefile
551
  managementgen/Makefile
620
  managementgen/Makefile
552
  etc/Makefile
621
  etc/Makefile
553
  src/Makefile
622
  src/Makefile
554
  src/tests/Makefile
623
  src/tests/Makefile
[+20] [20] 10 lines
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/swig_php_typemaps.i
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/Makefile.am
Revision 1086164 New Change
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/examples/php/cli/list_agents.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/Makefile.am
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/php.i
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/Makefile.am
Revision 1086164 New Change
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/client.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/hello_world.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_receiver.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_sender.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/server.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/web/hello_world.php
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/Makefile.am
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/php.i
New File
 
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/phpinfo.i
New File
 
  1. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/configure.ac: Loading...
  2. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/swig_php_typemaps.i: Loading...
  3. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/Makefile.am: Loading...
  4. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/examples/php/cli/list_agents.php: Loading...
  5. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/Makefile.am: Loading...
  6. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/php.i: Loading...
  7. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/Makefile.am: Loading...
  8. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/client.php: Loading...
  9. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/hello_world.php: Loading...
  10. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_receiver.php: Loading...
  11. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_sender.php: Loading...
  12. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/server.php: Loading...
  13. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/web/hello_world.php: Loading...
  14. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/Makefile.am: Loading...
  15. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/php.i: Loading...
  16. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/phpinfo.i: Loading...