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 3 (Latest)

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/CMakeLists.txt: Loading...
  3. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/swig_php_typemaps.i: Loading...
  4. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/Makefile.am: Loading...
  5. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/examples/php/cli/list_agents.php: Loading...
  6. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/CMakeLists.txt: Loading...
  7. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/Makefile.am: Loading...
  8. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/php.i: Loading...
  9. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/Makefile.am: Loading...
  10. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/client.php: Loading...
  11. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/hello_world.php: Loading...
  12. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_receiver.php: Loading...
  13. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_sender.php: Loading...
  14. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/server.php: Loading...
  15. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/web/hello_world.php: Loading...
  16. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/CMakeLists.txt: Loading...
  17. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/Makefile.am: Loading...
  18. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/php.i: Loading...
  19. 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 1405640 New Change
[20] 225 lines
[+20]
226
    AC_SUBST(PYTHON_CFLAGS)
226
    AC_SUBST(PYTHON_CFLAGS)
227
    AC_SUBST(PYTHON_LIBS)
227
    AC_SUBST(PYTHON_LIBS)
228
])
228
])
229
AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test x$have_python_dev = xyes && test -n "$SWIG"])
229
AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test x$have_python_dev = xyes && 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] 283 lines
[+20]
519
  examples/old_api/tradedemo/Makefile
586
  examples/old_api/tradedemo/Makefile
520
  examples/messaging/Makefile
587
  examples/messaging/Makefile
521
  bindings/qpid/Makefile
588
  bindings/qpid/Makefile
522
  bindings/qpid/ruby/Makefile
589
  bindings/qpid/ruby/Makefile
523
  bindings/qpid/python/Makefile
590
  bindings/qpid/python/Makefile

    
   
591
  bindings/qpid/php/Makefile
524
  bindings/qpid/perl/Makefile.PL
592
  bindings/qpid/perl/Makefile.PL
525
  bindings/qpid/dotnet/Makefile
593
  bindings/qpid/dotnet/Makefile
526
  bindings/qmf/Makefile
594
  bindings/qmf/Makefile
527
  bindings/qmf/ruby/Makefile
595
  bindings/qmf/ruby/Makefile
528
  bindings/qmf/python/Makefile
596
  bindings/qmf/python/Makefile
529
  bindings/qmf/tests/Makefile
597
  bindings/qmf/tests/Makefile
530
  bindings/qmf2/Makefile
598
  bindings/qmf2/Makefile
531
  bindings/qmf2/ruby/Makefile
599
  bindings/qmf2/ruby/Makefile
532
  bindings/qmf2/python/Makefile
600
  bindings/qmf2/python/Makefile

    
   
601
  bindings/qmf2/php/Makefile
533
  bindings/qmf2/examples/cpp/Makefile
602
  bindings/qmf2/examples/cpp/Makefile
534
  managementgen/Makefile
603
  managementgen/Makefile
535
  etc/Makefile
604
  etc/Makefile
536
  src/Makefile
605
  src/Makefile
537
  src/tests/cpg_check.sh
606
  src/tests/cpg_check.sh
[+20] [20] 12 lines
http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/CMakeLists.txt
Revision 1405640 New Change
 
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 1405640 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/CMakeLists.txt
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 1405640 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/CMakeLists.txt
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/CMakeLists.txt: Loading...
  3. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/swig_php_typemaps.i: Loading...
  4. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/Makefile.am: Loading...
  5. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/examples/php/cli/list_agents.php: Loading...
  6. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/CMakeLists.txt: Loading...
  7. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/Makefile.am: Loading...
  8. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qmf2/php/php.i: Loading...
  9. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/Makefile.am: Loading...
  10. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/client.php: Loading...
  11. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/hello_world.php: Loading...
  12. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_receiver.php: Loading...
  13. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/map_sender.php: Loading...
  14. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/cli/server.php: Loading...
  15. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/examples/php/web/hello_world.php: Loading...
  16. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/CMakeLists.txt: Loading...
  17. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/Makefile.am: Loading...
  18. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/php.i: Loading...
  19. http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/bindings/qpid/php/phpinfo.i: Loading...