4 # whether to enable various libcfs debugs (CDEBUG, ENTRY/EXIT, LASSERT, etc.)
6 AC_DEFUN([LN_CONFIG_CDEBUG],
8 AC_MSG_CHECKING([whether to enable CDEBUG, CWARN])
9 AC_ARG_ENABLE([libcfs_cdebug],
10 AC_HELP_STRING([--disable-libcfs-cdebug],
11 [disable libcfs CDEBUG, CWARN]),
12 [],[enable_libcfs_cdebug='yes'])
13 AC_MSG_RESULT([$enable_libcfs_cdebug])
14 if test x$enable_libcfs_cdebug = xyes; then
15 AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])
17 AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN])
20 AC_MSG_CHECKING([whether to enable ENTRY/EXIT])
21 AC_ARG_ENABLE([libcfs_trace],
22 AC_HELP_STRING([--disable-libcfs-trace],
23 [disable libcfs ENTRY/EXIT]),
24 [],[enable_libcfs_trace='yes'])
25 AC_MSG_RESULT([$enable_libcfs_trace])
26 if test x$enable_libcfs_trace = xyes; then
27 AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])
29 AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT])
32 AC_MSG_CHECKING([whether to enable LASSERT, LASSERTF])
33 AC_ARG_ENABLE([libcfs_assert],
34 AC_HELP_STRING([--disable-libcfs-assert],
35 [disable libcfs LASSERT, LASSERTF]),
36 [],[enable_libcfs_assert='yes'])
37 AC_MSG_RESULT([$enable_libcfs_assert])
38 if test x$enable_libcfs_assert = xyes; then
39 AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF])
44 # LIBCFS_CONFIG_PANIC_DUMPLOG
46 # check if tunable panic_dumplog is wanted
48 AC_DEFUN([LIBCFS_CONFIG_PANIC_DUMPLOG],
49 [AC_MSG_CHECKING([for tunable panic_dumplog support])
50 AC_ARG_ENABLE([panic_dumplog],
51 AC_HELP_STRING([--enable-panic_dumplog],
52 [enable panic_dumplog]),
53 [],[enable_panic_dumplog='no'])
54 if test x$enable_panic_dumplog = xyes ; then
55 AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic])
56 AC_MSG_RESULT([yes (by request)])
63 # LIBCFS_STRUCT_PAGE_LIST
65 # 2.6.4 no longer has page->list
67 AC_DEFUN([LIBCFS_STRUCT_PAGE_LIST],
68 [AC_MSG_CHECKING([if struct page has a list field])
69 LB_LINUX_TRY_COMPILE([
76 AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
83 # LIBCFS_STRUCT_SIGHAND
85 # red hat 2.4 adds sighand to struct task_struct
87 AC_DEFUN([LIBCFS_STRUCT_SIGHAND],
88 [AC_MSG_CHECKING([if task_struct has a sighand field])
89 LB_LINUX_TRY_COMPILE([
90 #include <linux/sched.h>
95 AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
103 # LIBCFS_FUNC_CPU_ONLINE
105 # cpu_online is different in rh 2.4, vanilla 2.4, and 2.6
107 AC_DEFUN([LIBCFS_FUNC_CPU_ONLINE],
108 [AC_MSG_CHECKING([if kernel defines cpu_online()])
109 LB_LINUX_TRY_COMPILE([
110 #include <linux/sched.h>
115 AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])
124 # check if gfp_t is typedef-ed
126 AC_DEFUN([LIBCFS_TYPE_GFP_T],
127 [AC_MSG_CHECKING([if kernel defines gfp_t])
128 LB_LINUX_TRY_COMPILE([
129 #include <linux/gfp.h>
131 return sizeof(gfp_t);
134 AC_DEFINE(HAVE_GFP_T, 1, [gfp_t found])
141 # LIBCFS_TYPE_CPUMASK_T
143 # same goes for cpumask_t
145 AC_DEFUN([LIBCFS_TYPE_CPUMASK_T],
146 [AC_MSG_CHECKING([if kernel defines cpumask_t])
147 LB_LINUX_TRY_COMPILE([
148 #include <linux/sched.h>
150 return sizeof (cpumask_t);
153 AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
160 # LIBCFS_FUNC_SHOW_TASK
162 # we export show_task(), but not all kernels have it (yet)
164 AC_DEFUN([LIBCFS_FUNC_SHOW_TASK],
165 [LB_CHECK_SYMBOL_EXPORT([show_task],
166 [kernel/ksyms.c kernel/sched.c],[
167 AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
172 # check userland & kernel __u64 type
173 AC_DEFUN([LIBCFS_U64_LONG_LONG],
174 [AC_MSG_CHECKING([u64 is long long type])
176 CFLAGS="$CFLAGS -Werror"
178 #include <linux/types.h>
179 #include <linux/stddef.h>
181 unsigned long long *data1;
189 AC_DEFINE(HAVE_USER__U64_LONG_LONG, 1,
190 [__u64 is long long type])
195 AC_MSG_CHECKING([kernel __u64 is long long type])
196 tmp_flags="$EXTRA_KCFLAGS"
197 EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Werror"
198 LB_LINUX_TRY_COMPILE([
199 #include <linux/types.h>
200 #include <linux/stddef.h>
202 unsigned long long *data1;
208 AC_DEFINE(HAVE_KERN__U64_LONG_LONG, 1,
209 [kernel __u64 is long long type])
213 EXTRA_KCFLAGS="$tmp_flags"
216 # check if task_struct with rcu memeber
217 AC_DEFUN([LIBCFS_TASK_RCU],
218 [AC_MSG_CHECKING([if task_struct has a rcu field])
219 LB_LINUX_TRY_COMPILE([
220 #include <linux/sched.h>
222 struct task_struct tsk;
227 AC_DEFINE(HAVE_TASK_RCU, 1,
228 [task_struct has rcu field])
234 # LIBCFS_TASKLIST_LOCK
235 # 2.6.18 remove tasklist_lock export
236 AC_DEFUN([LIBCFS_TASKLIST_LOCK],
237 [LB_CHECK_SYMBOL_EXPORT([tasklist_lock],
239 AC_DEFINE(HAVE_TASKLIST_LOCK, 1,
240 [tasklist_lock exported])
246 # kmem_cache_destroy(cachep) return void instead of
248 AC_DEFUN([LIBCFS_KMEM_CACHE_DESTROY_INT],
249 [AC_MSG_CHECKING([kmem_cache_destroy(cachep) return int])
250 LB_LINUX_TRY_COMPILE([
251 #include <linux/slab.h>
253 int i = kmem_cache_destroy(NULL);
256 AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT, 1,
257 [kmem_cache_destroy(cachep) return int])
264 #panic_notifier_list use atomic_notifier operations
266 AC_DEFUN([LIBCFS_ATOMIC_PANIC_NOTIFIER],
267 [AC_MSG_CHECKING([panic_notifier_list is atomic])
268 LB_LINUX_TRY_COMPILE([
269 #include <linux/notifier.h>
270 #include <linux/kernel.h>
272 struct atomic_notifier_head panic_notifier_list;
275 AC_DEFINE(HAVE_ATOMIC_PANIC_NOTIFIER, 1,
276 [panic_notifier_list is atomic_notifier_head])
282 # since 2.6.19 nlmsg_multicast() needs 5 argument.
283 AC_DEFUN([LIBCFS_NLMSG_MULTICAST],
284 [AC_MSG_CHECKING([nlmsg_multicast needs 5 argument])
285 LB_LINUX_TRY_COMPILE([
286 #include <net/netlink.h>
288 nlmsg_multicast(NULL, NULL, 0, 0, 0);
291 AC_DEFINE(HAVE_NLMSG_MULTICAST_5ARGS, 1,
292 [nlmsg_multicast needs 5 argument])
301 # If we have netlink.h, and nlmsg_new takes 2 args (2.6.19)
303 AC_DEFUN([LIBCFS_NETLINK],
304 [AC_MSG_CHECKING([if netlink.h can be compiled])
305 LB_LINUX_TRY_COMPILE([
306 #include <net/netlink.h>
309 AC_DEFINE(HAVE_NETLINK, 1, [net/netlink.h found])
311 AC_MSG_CHECKING([if nlmsg_new takes a 2nd argument])
312 LB_LINUX_TRY_COMPILE([
313 #include <net/netlink.h>
315 nlmsg_new(100, GFP_KERNEL);
318 AC_DEFINE(HAVE_NETLINK_NL2, 1, [nlmsg_new takes 2 args])
327 # 2.6.20 API change INIT_WORK use 2 args and not
329 AC_DEFUN([LIBCFS_3ARGS_INIT_WORK],
330 [AC_MSG_CHECKING([check INIT_WORK want 3 args])
331 LB_LINUX_TRY_COMPILE([
332 #include <linux/workqueue.h>
334 struct work_struct work;
336 INIT_WORK(&work, NULL, NULL);
339 AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1,
340 [INIT_WORK use 3 args and store data inside])
346 # 2.6.21 api change. 'register_sysctl_table' use only one argument,
347 # instead of more old which need two.
348 AC_DEFUN([LIBCFS_2ARGS_REGISTER_SYSCTL],
349 [AC_MSG_CHECKING([check register_sysctl_table want 2 args])
350 LB_LINUX_TRY_COMPILE([
351 #include <linux/sysctl.h>
353 return register_sysctl_table(NULL,0);
356 AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1,
357 [register_sysctl_table want 2 args])
363 # 2.6.21 marks kmem_cache_t deprecated and uses struct kmem_cache
365 AC_DEFUN([LIBCFS_KMEM_CACHE],
366 [AC_MSG_CHECKING([check kernel has struct kmem_cache])
367 tmp_flags="$EXTRA_KCFLAGS"
368 EXTRA_KCFLAGS="-Werror"
369 LB_LINUX_TRY_COMPILE([
370 #include <linux/slab.h>
371 typedef struct kmem_cache cache_t;
373 cache_t *cachep = NULL;
375 kmem_cache_alloc(cachep, 0);
378 AC_DEFINE(HAVE_KMEM_CACHE, 1,
379 [kernel has struct kmem_cache])
383 EXTRA_KCFLAGS="$tmp_flags"
386 # 2.6.23 lost dtor argument
387 AC_DEFUN([LIBCFS_KMEM_CACHE_CREATE_DTOR],
388 [AC_MSG_CHECKING([check kmem_cache_create has dtor argument])
389 LB_LINUX_TRY_COMPILE([
390 #include <linux/slab.h>
392 kmem_cache_create(NULL, 0, 0, 0, NULL, NULL);
395 AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DTOR, 1,
396 [kmem_cache_create has dtor argument])
403 AC_DEFUN([LIBCFS_NETLINK_CBMUTEX],
404 [AC_MSG_CHECKING([for mutex in netlink_kernel_create])
405 LB_LINUX_TRY_COMPILE([
406 #include <linux/netlink.h>
408 struct mutex *lock = NULL;
410 netlink_kernel_create(0, 0, NULL, lock, NULL);
413 AC_DEFINE(HAVE_NETLINK_CBMUTEX, 1,
414 [netlink_kernel_create want mutex for callback])
420 # 2.6.24 request not use real numbers for ctl_name
421 AC_DEFUN([LIBCFS_SYSCTL_UNNUMBERED],
422 [AC_MSG_CHECKING([for CTL_UNNUMBERED])
423 LB_LINUX_TRY_COMPILE([
424 #include <linux/sysctl.h>
426 #ifndef CTL_UNNUMBERED
427 #error CTL_UNNUMBERED not exist in kernel
431 AC_DEFINE(HAVE_SYSCTL_UNNUMBERED, 1,
432 [sysctl has CTL_UNNUMBERED])
438 # 2.6.24 lost scatterlist->page
439 AC_DEFUN([LIBCFS_SCATTERLIST_SETPAGE],
440 [AC_MSG_CHECKING([for exist sg_set_page])
441 LB_LINUX_TRY_COMPILE([
442 #include <asm/types.h>
443 #include <linux/scatterlist.h>
445 sg_set_page(NULL,NULL,0,0);
448 AC_DEFINE(HAVE_SCATTERLIST_SETPAGE, 1,
449 [struct scatterlist has page member])
455 # from 2.6.24 please use sg_init_table
456 AC_DEFUN([LIBCFS_SCATTERLIST_INITTABLE],
457 [AC_MSG_CHECKING([if sg_init_table is defined])
458 LB_LINUX_TRY_COMPILE([
459 #include <linux/scatterlist.h>
461 sg_init_table(NULL,0);
464 AC_DEFINE(HAVE_SCATTERLIST_INITTABLE, 1,
465 [sg_init_table is defined])
472 AC_DEFUN([LIBCFS_NETWORK_NAMESPACE],
473 [AC_MSG_CHECKING([for network stack has namespaces])
474 LB_LINUX_TRY_COMPILE([
475 #include <net/net_namespace.h>
477 struct net *net = &init_net;
480 AC_DEFINE(HAVE_INIT_NET, 1,
481 [kernel is support network namespaces ])
489 AC_DEFUN([LIBCFS_NETLINK_NETNS],
490 [AC_MSG_CHECKING([for netlink support net ns])
491 LB_LINUX_TRY_COMPILE([
492 #include <linux/netlink.h>
494 struct net *net = NULL;
495 struct mutex *lock = NULL;
497 netlink_kernel_create(net, 0, 0, NULL,
502 AC_DEFINE(HAVE_NETLINK_NS, 1,
503 [netlink is support network namespace])
505 # for now - if kernel have netlink ns - he uses cbmutex
506 AC_DEFINE(HAVE_NETLINK_CBMUTEX, 1,
507 [netlink_kernel_create want mutex for callback])
515 AC_DEFUN([LIBCFS_NL_BROADCAST_GFP],
516 [AC_MSG_CHECKING([for netlink_broadcast is want to have gfp parameter])
517 LB_LINUX_TRY_COMPILE([
518 #include <linux/netlink.h>
520 gfp_t gfp = GFP_KERNEL;
522 netlink_broadcast(NULL, NULL, 0, 0, gfp);
525 AC_DEFINE(HAVE_NL_BROADCAST_GFP, 1,
526 [netlink brouacast is want to have gfp paramter])
533 # LIBCFS_FUNC_DUMP_TRACE
535 # 2.6.23 exports dump_trace() so we can dump_stack() on any task
536 # 2.6.24 has stacktrace_ops.address with "reliable" parameter
538 AC_DEFUN([LIBCFS_FUNC_DUMP_TRACE],
539 [LB_CHECK_SYMBOL_EXPORT([dump_trace],
540 [kernel/ksyms.c arch/${LINUX_ARCH%_64}/kernel/traps_64.c],[
541 tmp_flags="$EXTRA_KCFLAGS"
542 EXTRA_KCFLAGS="-Werror"
543 AC_MSG_CHECKING([whether we can really use dump_trace])
544 LB_LINUX_TRY_COMPILE([
547 #include <asm/stacktrace.h>
551 AC_DEFINE(HAVE_DUMP_TRACE, 1, [dump_trace is exported])
556 AC_MSG_CHECKING([whether print_trace_address has reliable argument])
557 LB_LINUX_TRY_COMPILE([
560 void print_addr(void *data, unsigned long addr, int reliable);
561 #include <asm/stacktrace.h>
563 struct stacktrace_ops ops;
565 ops.address = print_addr;
568 AC_DEFINE(HAVE_TRACE_ADDRESS_RELIABLE, 1,
569 [print_trace_address has reliable argument])
574 EXTRA_KCFLAGS="$tmp_flags"
579 # 2.6.26 use int instead of atomic for sem.count
580 AC_DEFUN([LIBCFS_SEM_COUNT],
581 [AC_MSG_CHECKING([atomic sem.count])
582 LB_LINUX_TRY_COMPILE([
583 #include <asm/semaphore.h>
587 atomic_read(&s.count);
590 AC_DEFINE(HAVE_SEM_COUNT_ATOMIC, 1,
591 [semaphore counter is atomic])
597 # 2.6.27 have second argument to sock_map_fd
598 AC_DEFUN([LIBCFS_SOCK_MAP_FD_2ARG],
599 [AC_MSG_CHECKING([sock_map_fd have second argument])
600 LB_LINUX_TRY_COMPILE([
601 #include <linux/net.h>
603 sock_map_fd(NULL, 0);
606 AC_DEFINE(HAVE_SOCK_MAP_FD_2ARG, 1,
607 [sock_map_fd have second argument])
613 # LIBCFS_CRED_WRAPPERS
615 # wrappers for task's credentials are in sles11
617 AC_DEFUN([LIBCFS_CRED_WRAPPERS],
618 [AC_MSG_CHECKING([if kernel has wrappers for task's credentials])
619 LB_LINUX_TRY_COMPILE([
620 #include <linux/sched.h>
627 AC_DEFINE(HAVE_CRED_WRAPPERS, 1, [task's cred wrappers found])
634 # LN_STRUCT_CRED_IN_TASK
636 # struct cred was introduced in 2.6.29 to streamline credentials in task struct
638 AC_DEFUN([LIBCFS_STRUCT_CRED_IN_TASK],
639 [AC_MSG_CHECKING([if kernel has struct cred])
640 LB_LINUX_TRY_COMPILE([
641 #include <linux/sched.h>
643 struct task_struct *tsk = NULL;
644 tsk->real_cred = NULL;
647 AC_DEFINE(HAVE_STRUCT_CRED, 1, [struct cred found])
654 # LIBCFS_FUNC_UNSHARE_FS_STRUCT
656 # unshare_fs_struct was introduced in 2.6.30 to prevent others to directly
657 # mess with copy_fs_struct
659 AC_DEFUN([LIBCFS_FUNC_UNSHARE_FS_STRUCT],
660 [AC_MSG_CHECKING([if kernel defines unshare_fs_struct()])
661 tmp_flags="$EXTRA_KCFLAGS"
662 EXTRA_KCFLAGS="-Werror"
663 LB_LINUX_TRY_COMPILE([
664 #include <linux/sched.h>
665 #include <linux/fs_struct.h>
670 AC_DEFINE(HAVE_UNSHARE_FS_STRUCT, 1, [unshare_fs_struct found])
674 EXTRA_KCFLAGS="$tmp_flags"
678 # LIBCFS_HAVE_IS_COMPAT_TASK
680 # Added in 2.6.17, it wasn't until 2.6.29 that all
681 # Linux architectures have is_compat_task()
683 AC_DEFUN([LIBCFS_HAVE_IS_COMPAT_TASK],
684 [AC_MSG_CHECKING([if is_compat_task() is declared])
685 LB_LINUX_TRY_COMPILE([
686 #include <linux/compat.h>
688 int i = is_compat_task();
691 AC_DEFINE(HAVE_IS_COMPAT_TASK, 1, [is_compat_task() is available])
700 # LNet linux kernel checks
702 AC_DEFUN([LIBCFS_PROG_LINUX],
704 LIBCFS_FUNC_CPU_ONLINE
706 LIBCFS_TYPE_CPUMASK_T
707 LIBCFS_CONFIG_PANIC_DUMPLOG
709 LIBCFS_STRUCT_PAGE_LIST
710 LIBCFS_STRUCT_SIGHAND
711 LIBCFS_FUNC_SHOW_TASK
716 LIBCFS_HAVE_IS_COMPAT_TASK
719 LIBCFS_NLMSG_MULTICAST
720 LIBCFS_KMEM_CACHE_DESTROY_INT
721 LIBCFS_ATOMIC_PANIC_NOTIFIER
723 LIBCFS_3ARGS_INIT_WORK
725 LIBCFS_2ARGS_REGISTER_SYSCTL
728 LIBCFS_KMEM_CACHE_CREATE_DTOR
729 LIBCFS_NETLINK_CBMUTEX
731 LIBCFS_SYSCTL_UNNUMBERED
732 LIBCFS_SCATTERLIST_SETPAGE
733 LIBCFS_SCATTERLIST_INITTABLE
734 LIBCFS_NL_BROADCAST_GFP
735 LIBCFS_NETWORK_NAMESPACE
737 LIBCFS_FUNC_DUMP_TRACE
743 LIBCFS_STRUCT_CRED_IN_TASK
745 LIBCFS_FUNC_UNSHARE_FS_STRUCT
746 LIBCFS_SOCK_MAP_FD_2ARG
754 AC_DEFUN([LIBCFS_PROG_DARWIN],
755 [LB_DARWIN_CHECK_FUNCS([get_preemption_level])
759 # LIBCFS_PATH_DEFAULTS
761 # default paths for installed files
763 AC_DEFUN([LIBCFS_PATH_DEFAULTS],
770 # other configure checks
772 AC_DEFUN([LIBCFS_CONFIGURE],
773 [# lnet/utils/portals.c
774 AC_CHECK_HEADERS([asm/types.h endian.h sys/ioctl.h])
777 AC_CHECK_HEADERS([linux/version.h])
779 AC_CHECK_TYPE([spinlock_t],
780 [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])],
782 [#include <linux/spinlock.h>])
784 # lnet/utils/wirecheck.c
785 AC_CHECK_FUNCS([strnlen])
787 AC_CHECK_TYPE([umode_t],
788 [AC_DEFINE(HAVE_UMODE_T, 1, [umode_t is defined])],
790 [#include <asm/types.h>])
792 AC_CHECK_TYPE([__s8],
793 [AC_DEFINE(HAVE___S8, 1, [__s8 is defined])],
795 [#include <asm/types.h>])
797 AC_CHECK_TYPE([__u8],
798 [AC_DEFINE(HAVE___U8, 1, [__u8 is defined])],
800 [#include <asm/types.h>])
802 AC_CHECK_TYPE([__s16],
803 [AC_DEFINE(HAVE___S16, 1, [__s16 is defined])],
805 [#include <asm/types.h>])
807 AC_CHECK_TYPE([__u16],
808 [AC_DEFINE(HAVE___U16, 1, [__u16 is defined])],
810 [#include <asm/types.h>])
812 AC_CHECK_TYPE([__s32],
813 [AC_DEFINE(HAVE___S32, 1, [__s32 is defined])],
815 [#include <asm/types.h>])
817 AC_CHECK_TYPE([__u32],
818 [AC_DEFINE(HAVE___U32, 1, [__u32 is defined])],
820 [#include <asm/types.h>])
822 AC_CHECK_TYPE([__u64],
823 [AC_DEFINE(HAVE___U64, 1, [__u64 is defined])],
825 [#include <asm/types.h>])
827 AC_CHECK_TYPE([__s64],
828 [AC_DEFINE(HAVE___S64, 1, [__s64 is defined])],
830 [#include <asm/types.h>])
832 # -------- Check for required packages --------------
835 AC_MSG_CHECKING([if efence debugging support is requested])
836 AC_ARG_ENABLE(efence,
837 AC_HELP_STRING([--enable-efence],
838 [use efence library]),
839 [],[enable_efence='no'])
840 AC_MSG_RESULT([$enable_efence])
841 if test "$enable_efence" = "yes" ; then
843 AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
850 # -------- check for -lpthread support ----
851 AC_MSG_CHECKING([whether to use libpthread for libcfs library])
852 AC_ARG_ENABLE([libpthread],
853 AC_HELP_STRING([--disable-libpthread],
854 [disable libpthread]),
855 [],[enable_libpthread=yes])
856 if test "$enable_libpthread" = "yes" ; then
857 AC_CHECK_LIB([pthread], [pthread_create],
858 [ENABLE_LIBPTHREAD="yes"],
859 [ENABLE_LIBPTHREAD="no"])
860 if test "$ENABLE_LIBPTHREAD" = "yes" ; then
861 AC_MSG_RESULT([$ENABLE_LIBPTHREAD])
862 PTHREAD_LIBS="-lpthread"
863 AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread])
866 AC_MSG_RESULT([no libpthread is found])
868 AC_SUBST(PTHREAD_LIBS)
870 AC_MSG_RESULT([no (disabled explicitly)])
871 ENABLE_LIBPTHREAD="no"
873 AC_SUBST(ENABLE_LIBPTHREAD)
879 # LIBCFS_CONDITIONALS
881 # AM_CONDITOINAL defines for lnet
883 AC_DEFUN([LIBCFS_CONDITIONALS],
888 # LIBCFS_CONFIG_FILES
890 # files that should be generated with AC_OUTPUT
892 AC_DEFUN([LIBCFS_CONFIG_FILES],
897 libcfs/autoconf/Makefile
898 libcfs/include/Makefile
899 libcfs/include/libcfs/Makefile
900 libcfs/include/libcfs/linux/Makefile
901 libcfs/include/libcfs/posix/Makefile
902 libcfs/include/libcfs/util/Makefile
903 libcfs/libcfs/Makefile
904 libcfs/libcfs/autoMakefile
905 libcfs/libcfs/linux/Makefile
906 libcfs/libcfs/posix/Makefile
907 libcfs/libcfs/util/Makefile
908 libcfs/include/libcfs/darwin/Makefile
909 libcfs/libcfs/darwin/Makefile