diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-02-05 09:54:11 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-02-05 09:54:11 -0800 |
commit | e1971e4774a6ebb5ed33a09bdd60afa2c0534b6f (patch) | |
tree | f4fc5aaccb4d9dac43ae7a825df9006532c1a059 /configure.ac | |
download | vyatta-biosdevname-e1971e4774a6ebb5ed33a09bdd60afa2c0534b6f.tar.gz vyatta-biosdevname-e1971e4774a6ebb5ed33a09bdd60afa2c0534b6f.zip |
Initial commit.debian/0.1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..5ee9c32 --- /dev/null +++ b/configure.ac @@ -0,0 +1,83 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. +# vim:tw=0:ts=8:sw=8:et + +AC_PREREQ(2.59) +AC_INIT([biosdevname],[0.2.4],[Matt_Domsch@dell.com]) +AC_LANG([C]) +AC_CONFIG_SRCDIR([src/read_proc.c]) +AC_CONFIG_HEADER([config.h]) +AC_PREFIX_DEFAULT() +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE + +# Checks for programs. +AC_PROG_AWK +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_LN_S +AC_CHECK_PROGS([READELF], [readelf]) + +# Checks for libraries. +AC_CHECK_LIB([c], [snprintf]) +# libz has to come before libpci because libpci needs it now. +AC_CHECK_LIB([z], [gzopen], [], + [AC_MSG_ERROR([You must install zlib-devel or equivalent])]) +AC_CHECK_LIB([pci], [pci_alloc], [], + [AC_MSG_ERROR([You must install pciutils or equivalent])], + -lz) + +# Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([fcntl.h limits.h locale.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/time.h syslog.h unistd.h]) +AC_CHECK_HEADER([pci/pci.h], , + [AC_MSG_ERROR([You must install pciutils-devel or equivalent])]) +AC_CHECK_HEADER([zlib.h], , + [AC_MSG_ERROR([You must install zlib-devel or equivalent])]) + +# Check for pci_dev.domain +AC_CHECK_MEMBERS([struct pci_dev.domain], , , [#include<pci/pci.h>]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_OFF_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM + +# Checks for library functions. +AC_FUNC_ALLOCA +AC_FUNC_FORK +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MALLOC +AC_FUNC_MEMCMP +AC_FUNC_MMAP +AC_FUNC_REALLOC +AC_FUNC_SELECT_ARGTYPES +AC_FUNC_STAT +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([dup2 gettimeofday memset munmap select socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul]) + +# this is ugly, but accounts for SLES 10, Red Hat/Fedora, and Ubuntu +# handles default udev rules as of udev 114 or thereabouts +RULEDEST=71-biosdevname.rules +if [[ -e /etc/udev/rules.d/60-net.rules ]]; then + # RHEL / Fedora + RULEDEST=60-biosdevname.rules +elif [[ -e /etc/udev/rules.d/31-network.rules ]]; then + # SLES 10 + RULEDEST=31-biosdevname.rules +elif [[ -e /etc/udev/rules.d/25-iftab.rules ]]; then + # Ubuntu + RULEDEST=25-biosdevname.rules +fi +AC_SUBST(RULEDEST, $RULEDEST) + +echo "PACKAGE_NAME='$PACKAGE_NAME'" > version +echo "PACKAGE_VERSION='$PACKAGE_VERSION'" >> version +echo "PACKAGE_STRING='$PACKAGE_STRING'" >> version + +AC_CONFIG_FILES([Makefile biosdevname.spec.fedora biosdevname.spec.suse]) +AC_OUTPUT |