diff options
| author | 张智皓 <[email protected]> | 2023-08-04 03:18:14 +0000 |
|---|---|---|
| committer | 张智皓 <[email protected]> | 2023-08-04 03:18:14 +0000 |
| commit | 5fb7451dff0c90d485f05b7fb3129bc7164f341a (patch) | |
| tree | 709ae84589fae4e8f910393849f7422fa8339a5f | |
| parent | b2fbcc1fa8ba05058361d9fa3103e709de1e3258 (diff) | |
上传新文件
| -rw-r--r-- | userlib/configure.in | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/userlib/configure.in b/userlib/configure.in new file mode 100644 index 0000000..ad8b028 --- /dev/null +++ b/userlib/configure.in @@ -0,0 +1,67 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.57) +AC_INIT(libsiw, 0.9, [email protected]) +AC_CONFIG_SRCDIR([src/siw.h]) +AC_CONFIG_AUX_DIR(config) +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(libsiw, 0.9) +AM_PROG_LIBTOOL + +AC_ARG_ENABLE(libcheck, [ --disable-libcheck do not test for presence of ib libraries], + [ if test x$enableval = xno ; then + disable_libcheck=yes + fi + ]) + +dnl Checks for programs +AC_PROG_CC +AC_CHECK_SIZEOF(long) + +dnl Checks for libraries +if test "$disable_libcheck" != "yes" +then +AC_CHECK_LIB(ibverbs, ibv_get_device_list, [], + AC_MSG_ERROR([ibv_get_device_list() not found. libsiw requires libibverbs.])) +fi + +dnl Checks for header files. +AC_CHECK_HEADERS(sysfs/libsysfs.h) + +if test "$disable_libcheck" != "yes" +then +AC_CHECK_HEADER(infiniband/driver.h, [], + AC_MSG_ERROR([<infiniband/driver.h> not found. Is libibverbs installed?])) +AC_HEADER_STDC +fi + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl Checks for library functions +AC_CHECK_FUNCS(ibv_read_sysfs_file) + +dnl Now check if for libibverbs device library extension +dummy=if$$ +cat <<IBV_VERSION > $dummy.c +#include <infiniband/driver.h> +IBV_DEVICE_LIBRARY_EXTENSION +IBV_VERSION +IBV_DEVICE_LIBRARY_EXTENSION=`$CC $CPPFLAGS -E $dummy.c 2> /dev/null | tail -1` +rm -f $dummy.c +if test $IBV_DEVICE_LIBRARY_EXTENSION = IBV_DEVICE_LIBRARY_EXTENSION; then + AC_MSG_ERROR([IBV_DEVICE_LIBRARY_EXTENSION not defined. Is libibverbs new enough?]) +fi +AC_SUBST(IBV_DEVICE_LIBRARY_EXTENSION) + +AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, + if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then + ac_cv_version_script=yes + else + ac_cv_version_script=no + fi) + +AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes") + +AC_CONFIG_FILES([Makefile libsiw.spec]) +AC_OUTPUT |
