-
Notifications
You must be signed in to change notification settings - Fork 146
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
3 changed files
with
80 additions
and
34 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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
dnl $Id$ | ||
dnl config.m4 for extension libmosquitto | ||
dnl config.m4 for extension mosquitto | ||
|
||
dnl Comments in this file start with the string 'dnl'. | ||
dnl Remove where necessary. This file will not work | ||
dnl without editing. | ||
|
||
PHP_ARG_WITH(libmosquitto, for libmosquitto support, | ||
[ --with-libmosquitto Include libmosquitto support]) | ||
PHP_ARG_WITH(mosquitto, for mosquitto support, | ||
[ --with-mosquitto Include mosquitto support]) | ||
|
||
|
||
if test "$PHP_LIBMOSQUITTO" != "no"; then | ||
if test "$PHP_MOSQUITTO" != "no"; then | ||
dnl Write more examples of tests here... | ||
|
||
# --with-libmosquitto -> check with-path | ||
# --with-mosquitto -> check with-path | ||
SEARCH_PATH="/usr/local /usr" # you might want to change this | ||
SEARCH_FOR="/include/mosquitto.h" # you most likely want to change this | ||
if test -r $PHP_LIBMOSQUITTO/$SEARCH_FOR; then # path given as parameter | ||
LIBMOSQUITTO_DIR=$PHP_LIBMOSQUITTO | ||
if test -r $PHP_MOSQUITTO/$SEARCH_FOR; then # path given as parameter | ||
MOSQUITTO_DIR=$PHP_MOSQUITTO | ||
else # search default path list | ||
AC_MSG_CHECKING([for libmosquitto files in default path]) | ||
AC_MSG_CHECKING([for mosquitto files in default path]) | ||
for i in $SEARCH_PATH ; do | ||
if test -r $i/$SEARCH_FOR; then | ||
LIBMOSQUITTO_DIR=$i | ||
AC_MSG_CHECKING($LIBMOSQUITTO_DIR) | ||
MOSQUITTO_DIR=$i | ||
AC_MSG_CHECKING($MOSQUITTO_DIR) | ||
AC_MSG_RESULT(found in $i) | ||
fi | ||
done | ||
fi | ||
|
||
if test -z "$LIBMOSQUITTO_DIR"; then | ||
if test -z "$MOSQUITTO_DIR"; then | ||
AC_MSG_RESULT([not found]) | ||
AC_MSG_ERROR([Please reinstall the libmosquitto distribution]) | ||
AC_MSG_ERROR([Please reinstall the mosquitto distribution]) | ||
fi | ||
|
||
# --with-libmosquitto -> add include path | ||
PHP_ADD_INCLUDE($LIBMOSQUITTO_DIR/include) | ||
# --with-mosquitto -> add include path | ||
PHP_ADD_INCLUDE($MOSQUITTO_DIR/include) | ||
|
||
# --with-libmosquitto -> check for lib and symbol presence | ||
# --with-mosquitto -> check for lib and symbol presence | ||
LIBNAME=mosquitto # you may want to change this | ||
|
||
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LIBMOSQUITTO_DIR/lib, LIBMOSQUITTO_SHARED_LIBADD) | ||
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $MOSQUITTO_DIR/lib, MOSQUITTO_SHARED_LIBADD) | ||
|
||
PHP_SUBST(LIBMOSQUITTO_SHARED_LIBADD) | ||
PHP_SUBST(MOSQUITTO_SHARED_LIBADD) | ||
|
||
PHP_NEW_EXTENSION(libmosquitto, libmosquitto.c, $ext_shared) | ||
PHP_NEW_EXTENSION(mosquitto, mosquitto.c, $ext_shared) | ||
fi |
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
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