dnl ## dnl ## OSSP uuid - Universally Unique Identifier dnl ## Copyright (c) 2004-2005 Ralf S. Engelschall dnl ## Copyright (c) 2004-2005 The OSSP Project dnl ## dnl ## This file is part of OSSP uuid, a library for the generation dnl ## of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/ dnl ## dnl ## Permission to use, copy, modify, and distribute this software for dnl ## any purpose with or without fee is hereby granted, provided that dnl ## the above copyright notice and this permission notice appear in all dnl ## copies. dnl ## dnl ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED dnl ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF dnl ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. dnl ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR dnl ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, dnl ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT dnl ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF dnl ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND dnl ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, dnl ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT dnl ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF dnl ## SUCH DAMAGE. dnl ## dnl ## uuid.ac: UUID specific Autoconf checks dnl ## dnl # Check for anything OSSP uuid wants to know dnl # configure.in: dnl # UUID_CHECK_ALL AC_DEFUN(UUID_CHECK_ALL,[ dnl # make sure libnsl and libsocket are linked in if they exist AC_CHECK_LIB(nsl, gethostname) if test ".`echo $LIBS | grep nsl`" = .; then AC_CHECK_LIB(nsl, gethostbyname) fi AC_CHECK_LIB(socket, accept) dnl # check for system headers AC_CHECK_HEADERS(sys/types.h sys/param.h sys/time.h sys/socket.h sys/sockio.h sys/ioctl.h) AC_CHECK_HEADERS(netdb.h ifaddrs.h net/if.h net/if_dl.h net/if_arp.h netinet/in.h arpa/inet.h,,, [[ #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_SYS_IOCTL_H #include #endif ]]) dnl # check for functions AC_CHECK_FUNCS(getifaddrs nanosleep) dnl # check size of built-in types AC_CHECK_TYPES([long long, long double]) AC_CHECK_SIZEOF(char, 1) AC_CHECK_SIZEOF(unsigned char, 1) AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(unsigned short, 2) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(unsigned int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(unsigned long, 4) AC_CHECK_SIZEOF(long long, 8) AC_CHECK_SIZEOF(unsigned long long, 8) dnl # configure option --with-dce AC_ARG_WITH([dce], AC_HELP_STRING([--with-dce], [build DCE 1.1 backward compatibility API]), [ac_cv_with_dce=$withval], [ac_cv_with_dce=no]) AC_CACHE_CHECK([whether to build DCE 1.1 backward compatibility API], [ac_cv_with_dce], [ac_cv_with_dce=no]) if test ".$ac_cv_with_dce" = ".yes"; then AC_DEFINE(WITH_DCE, 1, [whether to build DCE 1.1 backward compatibility API]) WITH_DCE='yes' DCE_NAME='$(DCE_NAME)' else WITH_DCE='no' DCE_NAME='' fi AC_SUBST(WITH_DCE) AC_SUBST(DCE_NAME) dnl # configure option --with-perl AC_ARG_WITH([perl], AS_HELP_STRING([--with-perl], [build Perl bindings to C API]), [ac_cv_with_perl=$withval], [ac_cv_with_perl=no]) AC_CACHE_CHECK([whether to build Perl bindings to C API], [ac_cv_with_perl], [ac_cv_with_perl=no]) AC_ARG_WITH([perl-compat], AS_HELP_STRING([--with-perl-compat], [build Perl compatibility API]), [ac_cv_with_perl_compat=$withval], [ac_cv_with_perl_compat=no]) AC_CACHE_CHECK([whether to build Perl compatibility API], [ac_cv_with_perl_compat], [ac_cv_with_perl_compat=no]) if test ".$ac_cv_with_perl" = ".yes"; then AC_DEFINE(WITH_PERL, 1, [whether to build Perl bindings to C API]) WITH_PERL='yes' PERL_NAME='$(PERL_NAME)' else WITH_PERL='no' PERL_NAME='' fi if test ".$ac_cv_with_perl_compat" = ".yes"; then AC_DEFINE(WITH_PERL_COMPAT, 1, [whether to build Perl compatibility API]) WITH_PERL_COMPAT=1 else WITH_PERL_COMPAT=0 fi AC_SUBST(PERL_NAME) AC_SUBST(WITH_PERL) AC_SUBST(WITH_PERL_COMPAT) AC_PATH_PROG(PERL, perl, NA) if test ".$ac_cv_with_perl" = ".yes" -a ".$PERL" = ".NA"; then AC_ERROR([required Perl interpreter not found in \$PATH]) fi ])