Re: config.m4 possibly undefined macro

From: Date: Sun, 02 Oct 2011 16:12:59 +0000
Subject: Re: config.m4 possibly undefined macro
References: 1 2 3  Groups: php.internals php.pecl.dev 
Request: Send a blank email to internals+get-55684@lists.php.net to get a copy of this message
Hi: in that case, you can change name to whatever except ***ac. thanks 2011/10/2 Bertrand Mansion <bmansion@mamasam.com>: > If I ignore it and run ./configure --with-utrac > I get : > >    config.status: error: cannot find input file: config.h.in > > I don't get this error if I use another name. > So it doesn't seem so safe to ignore this warning after all :) > > Le 2 oct. 2011 à 15:37, Laruence a écrit : > >> Hi: >>    this warning can be ignored safely, >> >>    it seems a bug of php autoconf,  maybe  someone can verify this ? >> >>    in the PHP_NEW_EXTENSION defination,  I comment out the case >> statement of host_alias (this is also be down in PHP_SHARED_MODULE, so >> I think it might be a unecessary codes), then fixed the warnig: >> >>           PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) >> -      case $host_alias in >> -        *netware*[)] >>          PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7) >> -         ;; >> -      *[)] >> -        PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7) >> -       ;; >> -     esac >>      AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, >> Whether to build $1 as dynamic module) >>    fi >>  fi >> >> thanks >> >> 2011/10/2 Bertrand Mansion <bmansion@mamasam.com>: >>> Hi, >>> >>> I'd like to call my extension "utrac", but when I run phpize, it >>> returns the following error : >>> >>>    error: possibly undefined macro: AC_SHARED_LIBADD >>> >>> But if I name my extension "ut" instead of "utrac", I don't >>> get this error. >>> >>> Do you know why there is such an error with some names ? >>> Thanks in advance. >>> >>> Here is my config.m4 for this extension: >>> >>> PHP_ARG_WITH(utrac, for utrac support, >>> [  --with-utrac             Include utrac support]) >>> if test "$PHP_UTRAC" != "no"; then >>>  SEARCH_PATH="/usr/local /usr" >>>  SEARCH_FOR="/include/utrac.h" >>>  if test -r $PHP_UTRAC/; then >>>    UTRAC_DIR=$PHP_UTRAC >>>  else >>>    AC_MSG_CHECKING([for utrac files in default path]) >>>    for i in $SEARCH_PATH ; do >>>      if test -r $i/$SEARCH_FOR; then >>>        UTRAC_DIR=$i >>>        AC_MSG_RESULT(found in $i) >>> fi done >>> fi >>>  if test -z "$UTRAC_DIR"; then >>>    AC_MSG_RESULT([not found]) >>>    AC_MSG_ERROR([Please reinstall the utrac distribution]) >>> fi >>>  PHP_ADD_INCLUDE($UTRAC_DIR/include) >>>  LIBNAME=utrac >>>  LIBSYMBOL=ut_init >>>  PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, >>>  [ >>>    PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $UTRAC_DIR/lib, UTRAC_SHARED_LIBADD) >>>    AC_DEFINE(HAVE_UTRACLIB,1,[ ]) >>>  ],[ >>>    AC_MSG_ERROR([wrong utrac lib version or lib not found]) >>>  ],[ >>>    -L$UTRAC_DIR/lib -lm >>>  ]) >>>  PHP_SUBST(UTRAC_SHARED_LIBADD) >>>  PHP_NEW_EXTENSION(utrac, utrac.c, $ext_shared) >>> fi >>> >>> For reference, someone else also asked this question before, but for >>> an extension named "vault" : >>> >>> http://stackoverflow.com/questions/5252732/php-extension-config-m4-possibly-undefined-macro-lt-shared-libadd >>> >>> PS: if this is not the right place to ask questions about php >>> extension development, please direct me to a more suited place, since >>> I might have other questions to ask in the near future... >>> >>> -- >>> Bertrand Mansion >>> Mamasam >>> >>> -- >>> PECL development discussion Mailing List (http://pecl.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> >> >> >> -- >> Laruence  Xinchen Hui >> http://www.laruence.com/ > > -- Laruence  Xinchen Hui http://www.laruence.com/

« previous php.internals (#55684) next »