Re: Patches for saned/net/scanimage/user-authorization....

From: Jochen Eisinger (jochen.eisinger@gno.de)
Date: Sun Nov 19 2000 - 04:35:40 PST

  • Next message: Oliver Rauch: "Re: Patches for saned/net/scanimage/user-authorization...."

    Hi!

    [Oliver Rauch]
    > I think this test is not nice because
    > you do not test for strings.h at all.
    >
    > Does it work if we include string.h and strings.h if both exist?
    > If yes I suggest to add "strings.h" to
    > AC_CHECK_HEADERS(..)
    >
    > Or we do a AC_TRY_COMPILE([#include <strings.h>...)

    I suggest testing for string.h/index and if this fails for
    strings.h/index...

    something like this:

    AC_MSG_CHECKING([for string.h containing index])
    AC_TRY_COMPILE([
    #include <string.h>
    ],[char a[] = "a";
    int c = index(" ", ' ') - a;],
    ac_need_strings_h="no";
    [AC_MSG_RESULT([yes])],
    ac_need_strings_h="yes";
    [AC_MSG_RESULT([no])])

    if test "$ac_need_strings_h" = "yes" ; then

    AC_MSG_CHECKING([for strings.h containing index])
    AC_TRY_COMPILE([
    #include <strings.h>
    ],[char a[] = "a";
    int c = index(" ", ' ') - a;],
    CPPFLAGS="${CPPFLAGS} -DNEED_STRINGS_H";
    [AC_MSG_RESULT([yes])],
    [AC_MSG_ERROR([index () is neither in string.h nor in strings.h])])

    fi

    -- jochen

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Sun Nov 19 2000 - 04:22:50 PST