root/tags/orangefs-current/configure.in @ 8505

Revision 8505, 38.5 KB (checked in by anonymous, 3 years ago)

This commit was manufactured by cvs2svn to create tag 'orangefs-current'.

Line 
1dnl **************************************************************
2dnl PVFS2 AUTOCONF SCRIPT
3dnl
4dnl Process this file with autoconf to produce a configure script.
5dnl You may need to use autoheader as well if changing any DEFINEs
6
7dnl sanity checks, output header, location of scripts used here
8AC_INIT(include/pvfs2-types.h)
9AC_PREREQ(2.59)
10AC_CONFIG_AUX_DIR(maint/config)
11
12dnl
13dnl for test builds, insert the build date and time information into
14dnl into the version; for official releases, clear the PVFS2_PRE line
15dnl
16dnl PVFS2 versioning information. 
17dnl An @ in the date string can confuse e.g. scp and 'make kmod'
18CONFIGURE_TIME=`date -u +"%Y-%m-%d-%H%M%S"`
19PVFS2_VERSION_MAJOR=2
20PVFS2_VERSION_MINOR=8
21PVFS2_VERSION_SUB=2
22PVFS2_VERSION_RELEASE="orangefs-20100920"
23#PVFS2_PRE=""
24#PVFS2_VERSION_PRE="-orangefs-$CONFIGURE_TIME"
25
26PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE
27AC_SUBST(PVFS2_VERSION)
28AC_DEFINE_UNQUOTED(PVFS2_VERSION_MAJOR, $PVFS2_VERSION_MAJOR, major version number)
29AC_DEFINE_UNQUOTED(PVFS2_VERSION_MINOR, $PVFS2_VERSION_MINOR, minor version number)
30AC_DEFINE_UNQUOTED(PVFS2_VERSION_SUB, $PVFS2_VERSION_SUB, sub version number)
31AC_DEFINE_UNQUOTED(PVFS2_VERSION_RELEASE, $PVFS2_VERSION_RELEASE, release version number)
32AC_SUBST(PVFS2_VERSION_MAJOR)
33AC_SUBST(PVFS2_VERSION_MINOR)
34AC_SUBST(PVFS2_VERSION_SUB)
35AC_SUBST(PVFS2_VERSION_RELEASE)
36
37dnl BMI_ONLY_TAG
38
39dnl Checks for host type
40dnl Ensures we can compile on this OS
41AC_CANONICAL_HOST
42
43USR_CFLAGS=$CFLAGS
44if test "x$USR_CFLAGS" = "x"; then
45        USR_CFLAGS_SET=no
46fi
47
48AC_CONFIG_HEADER(pvfs2-config.h)
49
50AC_CHECK_HEADER([pwd.h],
51    [AC_DEFINE(HAVE_GETPWUID, 1, Define if pwd.h exists)])
52AC_CHECK_HEADER([sys/vfs.h],
53                [AC_DEFINE(HAVE_SYS_VFS_H, 1, Define if sys/vfs.h exists)])
54AC_CHECK_HEADER([sys/mount.h],
55                [AC_DEFINE(HAVE_SYS_MOUNT_H, 1, Define if sys/mount.h exists)])
56
57AC_CHECK_HEADERS([mntent.h, fstab.h])
58
59AC_CHECK_HEADERS(stdarg.h)
60
61AC_CHECK_HEADERS(attr/xattr.h)
62AC_CHECK_HEADERS(sys/xattr.h)
63
64AC_CHECK_SIZEOF([long int])
65
66dnl Check for utilities that we need during the build process
67AC_PROG_INSTALL
68AC_PROG_CC
69
70AC_MSG_CHECKING([for required gcc])
71if test "x$GCC" = "x"; then
72        AC_MSG_ERROR(no)
73fi
74
75CFLAGS=$USR_CFLAGS
76
77AC_PROG_CPP
78AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
79AC_CHECK_PROG(HAVE_FIND, find, yes, no)
80AC_CHECK_PROG(HAVE_BISON, bison, yes, no)
81AC_CHECK_PROG(HAVE_FLEX, flex, yes, no)
82
83
84AC_MSG_CHECKING([for required Math::BigInt perl module])
85perl -e "use Math::BigInt" 2>&1 > /dev/null
86if test $? != 0; then
87        AC_MSG_ERROR(no)
88else
89        AC_MSG_RESULT(yes)
90fi
91
92if test $host != $build; then
93        AC_CHECK_PROGS(BUILD_CC, gcc cc)
94else
95        BUILD_CC=$CC
96        BUILD_CFLAGS=$BUILD_CFLAGS
97        BUILD_LDFLAGS=$BUILD_LDFLAGS
98fi
99
100AC_SUBST(BUILD_CC)
101AC_SUBST(BUILD_CFLAGS)
102AC_SUBST(BUILD_LDFLAGS)
103
104#
105# Threading options.
106#
107# Client - thread-safe or not
108#   --disable-thread-safety : chooses null or posix locking mechanism
109#   For applications that know they are not multi-threaded, or choose
110#   to handle locking themselves, this configure option can be used to
111#   slightly decrease library-induced latency by removing the locking.
112#
113# Client - job threading
114#   libpvfs2-threaded.{so,a} with __PVFS2_JOB_THREADED__
115#   This option causes the client library to spawn an extra thread
116#   to handle network communications.  In this way, it is possible
117#   that the library can handle new and completed requests from
118#   the application while also interacting with the network.
119#
120#   These separate libraries can not be built using the existing
121#   configure mechanism.  They are only built if required by the
122#   kernel module helper.
123#
124# Server - three options:
125#   trove
126#     (hack Makefile.in)
127#   job
128#     (hack Makefile.in)
129#   aio
130#     --disable-aio-threaded-callbacks
131#
132#   Trove (storage) and job threading in the server are implemented
133#   using #defines, but not exported through the configure mechanism.
134#   AIO threaded callbacks are a separate thread used in conjunction
135#   with trove, and can be disabled through a configure option as
136#   AIO has been found to be buggy on many systems.
137#
138#
139# Kernel module helper - job threading
140#   --enable-threaded-kmod-helper
141#
142#   This is a special client that "helps" applications that access PVFS
143#   through the kernel using normal VFS calls (e.g. "ls").  This
144#   configure options builds it using __PVFS2_JOB_THREADED__ as described
145#   above.  That enables a thread for the network layer and a thread
146#   for the kernel interface.  This has the potential to increase the
147#   rate at which concurrent operations are processed, but has the potential
148#   drawback of somewhat higher overhead for a single operation and lack
149#   of testing.
150#
151#   Enabling this options causes one of libpvfs2-threaded.{so,a} to be
152#   built, depending on --enable-shared and --enable-static.  If both are
153#   enabled, the shared library takes precedence.
154#
155
156dnl a mechanism to turn off threads in the client library
157AC_MSG_CHECKING([for client library thread safety support])
158AC_ARG_ENABLE(thread-safety,
159[  --disable-thread-safety Disables thread safety in the client library],
160[if test "x$enableval" = "xno" ; then
161    LIBCFLAGS="$LIBCFLAGS -D__GEN_NULL_LOCKING__"
162    THREAD_LIB=""
163    AC_MSG_RESULT(no)
164fi],
165[   LIBCFLAGS="$LIBCFLAGS -D__GEN_POSIX_LOCKING__"
166    THREAD_LIB="-lpthread"
167    AC_MSG_RESULT(yes) ])
168
169AC_SUBST(LIBCFLAGS)
170AC_SUBST(THREAD_LIB)
171
172dnl a mechanism to disable building the PVFS2 server
173AC_ARG_ENABLE(server,
174[  --disable-server        Disables building of PVFS2 server],
175[if test "x$enableval" = "xyes" ; then
176    BUILD_SERVER=1
177    NEED_BERKELEY_DB=yes
178else
179    BUILD_SERVER=""
180fi],
181    BUILD_SERVER=1
182    NEED_BERKELEY_DB=yes)
183AC_SUBST(BUILD_SERVER)
184
185AC_ARG_WITH(openssl,
186        [  --with-openssl=<dir>    Build with openssl (default=/usr)
187  --without-openssl       Don't build with openssl.],
188        [AX_OPENSSL(${withval})],
189        [AX_OPENSSL_OPTIONAL])
190
191dnl a mechanism to turn off memory usage statistics in karma (may be
192dnl confusing for some classes of users)
193AC_ARG_ENABLE(karma-mem-usage-stats,
194[  --disable-karma-mem-usage-stats
195                          Disables memory usage stats in karma],
196[if test "x$enableval" = "xno" ; then
197    CFLAGS="$CFLAGS -D__KARMA_DISABLE_MEM_USAGE__"
198fi]
199,)
200
201dnl build only the bmi library
202AC_ARG_ENABLE(bmi-only,
203[  --enable-bmi-only       Build only the BMI library],
204[if test "x$enableval" = "xyes" ; then
205    BUILD_BMI_ONLY=1
206fi]
207,)
208AC_SUBST(BUILD_BMI_ONLY)
209
210dnl if we're only building the BMI lib, disable checks for server and DB.
211if test "x$BUILD_BMI_ONLY" = "x1"; then
212        BUILD_SERVER=""
213        NEED_BERKELEY_DB=no
214        AC_SUBST(BUILD_SERVER)
215        AC_SUBST(NEED_BERKELEY_DB)
216fi
217
218dnl a mechanism to turn off perf counters
219AC_ARG_ENABLE(perf-counters,
220[  --disable-perf-counters Disables pvfs2-server performance counters],
221[if test "x$enableval" = "xno" ; then
222    CFLAGS="$CFLAGS -D__PVFS2_DISABLE_PERF_COUNTERS__"
223fi]
224,)
225
226dnl a mechanism to turn on mmap-readahead caching (for kernel interface)
227MMAP_RA_CACHE=""
228AC_ARG_ENABLE(mmap-racache,
229[  --enable-mmap-racache   **EXPERIMENTAL** Enables mmap-readahead in kernel
230                          interface],
231[if test "x$enableval" = "xyes" ; then
232MMAP_RA_CACHE="-DUSE_MMAP_RA_CACHE"
233fi]
234,)
235AC_SUBST(MMAP_RA_CACHE)
236
237dnl See if the --enable-trusted-connections  option was given to configure
238AC_ARG_ENABLE(trusted-connections,
239[  --enable-trusted-connections
240                          **EXPERIMENTAL** Enable connects only
241                          from trusted hosts/ports ],
242[if test "x$enableval" = "xyes"; then
243TRUSTED_CONNECTIONS="-DUSE_TRUSTED"
244fi],
245)
246AC_SUBST(TRUSTED_CONNECTIONS)
247
248
249dnl a function to check if we have the required gtk stuff for the
250dnl karma gui
251test_for_karma()
252{
253  AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
254  if test "x$HAVE_PKGCONFIG" = "xyes" ; then
255     AC_MSG_CHECKING([for gtk2.0 (for karma gui)])
256     if `pkg-config --exists gtk+-2.0` ; then
257        AC_MSG_RESULT(yes)
258        GTKLIBS=`pkg-config --libs gtk+-2.0`
259        GTKCFLAGS=`pkg-config --cflags gtk+-2.0`
260
261        AC_SUBST(GTKLIBS)
262        AC_SUBST(GTKCFLAGS)
263        BUILD_KARMA="1"
264        AC_SUBST(BUILD_KARMA)
265     else
266        AC_MSG_RESULT(no)
267     fi
268  fi
269}
270
271dnl optionally disable building the karma gui
272AC_ARG_ENABLE(karma,
273[  --disable-karma         Disables optional gui.  (Enabled by default)],
274[ if test "x$enableval" = "xyes" ; then
275      test_for_karma
276   fi
277],
278[test_for_karma]
279)
280
281dnl shared or static client library (see --enable-shared below)
282AC_ARG_ENABLE(static,
283[  --disable-static        Do not build static client library],
284[build_static=$enableval], [build_static=yes])
285AC_SUBST(build_static)
286
287dnl NOTE: removing the linux-gnu host check for now; we may want to put it back
288dnl before releaseing any code, though...  -Phil
289dnl
290dnl AC_MSG_CHECKING(whether we know how to compile for this OS)
291dnl if test x$host_os != xlinux-gnu; then AC_MSG_ERROR($host_os not supported.)
292dnl else AC_MSG_RESULT(yes)
293dnl fi
294
295dnl some redhat 2.4 kernels have a lot of 2.6 features, so we need to take
296dnl special measures to accomodate those hacked kernels.  However, we do not
297dnl need to take these workarounds if someone is building a stock kernel.org
298dnl kernel. 
299
300dnl was the configure option passed in?
301set_redhat24=0
302dnl what was the configure option set to?
303use_redhat24=0
304
305AC_ARG_ENABLE([redhat24],
306[  --enable-redhat24       Enable workaround for RedHat 2.4 kernel],
307    set_redhat24=1
308    if test "$enableval" = no ; then
309        use_redhat24=0
310    else
311        use_redhat24=1
312    fi
313)
314
315dnl some systems (ie, RedHat EL 3 prior to Update 2) have buggy NPTL/Pthread
316dnl implementations.  We accomodate this with a server stub script hack that
317dnl attempts to disable NPTL and fall back to old fashioned Linux Threads.
318
319dnl was the configure option passed in?
320set_nptl_workaround=0
321dnl what was the configure option set to?
322use_nptl_workaround=0
323
324AC_ARG_ENABLE([nptl-workaround],
325[  --enable-nptl-workaround
326                          Enable workaround for buggy NPTL/Pthread libraries],
327    set_nptl_workaround=1
328    if test "$enableval" = no ; then
329        use_nptl_workaround=0
330    else
331        use_nptl_workaround=1
332    fi
333)
334
335dnl We check for the following redhat tags, as they all have similarly
336dnl modified 2.4.x kernels
337dnl
338RHTAG1="Red Hat Linux release 9"
339RHTAG2="Red Hat Enterprise Linux WS release 3"
340RHTAG3="Red Hat Enterprise Linux AS release 3"
341RHTAG4="Red Hat Enterprise Linux ES release 3"
342RHTAG5="Red Hat Linux Advanced Server release 2.1AS"
343RHTAG6="Fedora Core release 1 (Yarrow)"
344
345
346dnl we won't be able to catch all cases, but see if we can
347dnl get the majority of platforms where we might need to work around
348dnl backported features.  Basically we give up if running on these redhat
349dnl versions
350
351REDHAT_RELEASE=""
352if test -f /etc/redhat-release; then
353    AC_MSG_CHECKING(for tagged Redhat releases (must patch))
354    REDHAT_REL=`cat /etc/redhat-release`
355    if test "x`echo $REDHAT_REL | cut -b 1-23`" = "x$RHTAG1" ||
356       test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG2" ||
357       test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG3" ||
358       test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG4" ||
359       test "x`echo $REDHAT_REL | cut -b 1-43`" = "x$RHTAG5" ||
360       test "x`echo $REDHAT_REL | cut -b 1-30`" = "x$RHTAG6" ; then
361       AC_MSG_RESULT(yes)
362       
363       if test "$set_redhat24" = 0 || test "$set_nptl_workaround" = 0 ; then
364           AC_MSG_ERROR([
365    You appear to be configuring PVFS2 on a RedHat distribution that
366    likely ships with a heavily modified kernel and c library.  You must
367    specify two configure arguments to provide necessary information before
368    proceeding.  First pick one of these two options:
369    =============================
370    --enable-redhat24         (if you are using a redhat provided 2.4 kernel)
371    --disable-redhat24        (if you are using a stock kernel.org kernel)
372    =============================
373    Also pick one of the next two options.  You should probably enable the
374    workaround if you are using RedHat EL 3 prior to update 2.  Otherwise it
375    is probably safer (and higher performance) to disable it:
376    =============================
377    --enable-nptl-workaround  (to work around buggy glibc pthread library)
378    --disable-nptl-workaround (if you trust your glibc pthread library)
379    ============================= ])
380       fi
381    else
382       AC_MSG_RESULT(no)
383    fi
384fi
385
386dnl some non-redhat kernels (like whitebox linux and centos) rebuild
387dnl rhel and give the distribution a different name, so if the user sets
388dnl "enable-redhat24", then use it no matter what /etc/redhat-release might say
389
390if test "$use_redhat24" = 1 ; then
391   REDHAT_RELEASE="-DREDHAT_RELEASE_9"
392fi
393AC_SUBST(REDHAT_RELEASE)
394
395if test "$use_nptl_workaround" = 1 ; then
396   NPTL_WORKAROUND="1"
397fi
398AC_SUBST(NPTL_WORKAROUND)
399
400use_aio_thcb=1
401AC_ARG_ENABLE([aio-threaded-callbacks],
402[  --disable-aio-threaded-callbacks
403                          **EXPERIMENTAL** Disable use of AIO
404                          threaded callbacks],
405    if test "$enableval" = no ; then use_aio_thcb=0 ; fi)
406
407dnl there used to be a big hairy test in here, back when glibc-2.3.0 and
408dnl glibc-2.3.1 had buggy aio callbacks.  That test was broken because it
409dnl assumed just linux, and could not handle glibc-2.4.x (or newer).  Rely on
410dnl aio-threaded-callbacks, perhaps with a blacklist of distros that have the
411dnl broken glibc.
412
413MISC_TROVE_FLAGS=""
414if test $use_aio_thcb = 1 ; then
415        MISC_TROVE_FLAGS="-D__PVFS2_TROVE_AIO_THREADED__"
416fi
417AC_SUBST(MISC_TROVE_FLAGS)
418
419dnl Check for AIO's aiocb->__error_code field (linux has it, OS X doesn't)
420AC_MSG_CHECKING([for __error_code field in aiocb struct])
421AC_TRY_COMPILE(
422    [
423        #include <aio.h>
424    ],
425    [
426        struct aiocb aiocb;
427        aiocb.__error_code = 0;
428    ],
429    AC_MSG_RESULT(yes)
430    AC_DEFINE(HAVE_AIOCB_ERROR_CODE, 1, Define if aiocb->__error_code exists)
431    ,
432    AC_MSG_RESULT(no)
433)
434
435dnl Check for AIO's aiocb->__return_value field (linux has it, OS X doesn't)
436AC_MSG_CHECKING([for __return_value field in aiocb struct])
437AC_TRY_COMPILE(
438    [
439        #include <aio.h>
440    ],
441    [
442        struct aiocb aiocb;
443        aiocb.__return_value = 0;
444    ],
445    AC_MSG_RESULT(yes)
446    AC_DEFINE(HAVE_AIOCB_RETURN_VALUE, 1, Define if aiocb->__return_value exists)
447    ,
448    AC_MSG_RESULT(no)
449)
450dnl Check byte ordering
451AC_C_BIGENDIAN
452
453dnl Check size of pointer type; needed by id-generator
454AC_CHECK_SIZEOF(void *)
455
456dnl Options for debugging
457dnl This particular one enables tracing of memory allocation and
458dnl    freeing with the mtrace tool
459AC_ARG_WITH(mtrace,
460[  --with-mtrace           Use mtrace (must set MALLOC_TRACE to output file)],
461CFLAGS="$CFLAGS -include mcheck.h"
462AC_DEFINE(WITH_MTRACE, 1, Define if mtrace memory leak detection was enabled)
463)
464
465dnl This particular one enables berkeley db to emit detected errors
466AC_ARG_WITH(berkdb-debug,
467[  --with-berkdb-debug     Use berkeley db error reporting (if detected).],
468AC_DEFINE(BERKDB_ERROR_REPORTING, 1, Define if berkeley db error reporting was enabled)
469)
470
471TAU_INCS=
472BUILD_TAU=
473
474dnl use the tau trace library
475AC_ARG_WITH(tau,
476[  --with-tau=path         Use TAU trace library installed in "path"],
477    if test "x$withval" = "xyes" ; then
478           AC_MSG_ERROR(--with-tau must be given a pathname)
479    else
480       TAU_INCS="-I$withval/include"
481       CFLAGS="$CFLAGS $TAU_INCS -D__PVFS2_ENABLE_EVENT__"
482       LDFLAGS="$LDFLAGS -L$withval/$(uname -m)/lib"
483       tau_mkfile=$withval/$(uname -m)/lib/Makefile.*-profile-trace
484       if test ! -f $tau_mkfile; then
485           AC_MSG_ERROR(TAU not compiled with profiling and tracing support)
486       fi
487       tau_config=$(echo $tau_mkfile | sed -e "s|.*Makefile.tau-||")
488       LIBS="$LIBS -lTAU_tf -lTAU_traceinput-$tau_config -ltau-$tau_config -lpthread -lstdc++"
489       AC_DEFINE(HAVE_TAU, 1, [Define if TAU library is used])
490       BUILD_TAU=1
491    fi
492)
493
494AC_SUBST(TAU_INCS)
495AC_SUBST(BUILD_TAU)
496
497BUILD_KERNEL=
498
499dnl
500dnl Enables the kernel module to build if the appropriate
501dnl linux-2.6.x path is specified
502dnl Make sure this is a usable kernel source tree too.
503dnl
504AC_ARG_WITH(kernel,
505[  --with-kernel=srcpath   Build pvfs2 kernel module against 2.6.x src],
506    if test "x$withval" = "xyes" -o "x$withval" = "x" ; then
507           AC_MSG_ERROR(--with-kernel must be given the path to your kernel source.)
508    fi
509    if ! test -d $withval ; then
510           AC_MSG_ERROR(The --with-kernel path $withval is not a directory.)
511    fi
512    if ! test -r $withval/include/linux/version.h ; then
513       AC_MSG_ERROR(The kernel source tree must have been configured.)
514    fi
515    vers=`sed -n '/UTS_RELEASE/{; s/.*"\([0-9]\.[0-9]\).*".*/\1/; p; }' $withval/include/linux/version.h`
516    if ! grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then
517        # 2.6.18 moves UTS_RELEASE into its own header
518        if ! grep -q  UTS_RELEASE..2\\.6\\. $withval/include/linux/utsrelease.h ; then
519               AC_MSG_ERROR(The kernel source tree does not appear to be 2.6)
520        fi
521    fi
522    # At least up through 2.6.3 needed to write .__modpost.cmd; this changed
523    # sometime between then and 2.6.10.   Now anybody can compile out-of-tree
524    # modules against a configured kernel tree
525    LINUX_KERNEL_SRC="$withval"
526    BUILD_KERNEL=1
527    , LINUX_KERNEL_SRC=""
528)
529
530dnl
531dnl Enables the kernel module to build if the appropriate
532dnl linux-2.4.x path is specified
533dnl Make sure this is a usable kernel source tree too.
534dnl
535AC_ARG_WITH(kernel24,
536[  --with-kernel24=srcpath Build pvfs2 kernel module against 2.4.x src],
537    if test "x$withval" = "xyes" -o "x$withval" = "x" ; then
538           AC_MSG_ERROR(--with-kernel24 must be given the path to your kernel 2.4.x source.)
539    fi
540    if ! test -d $withval ; then
541           AC_MSG_ERROR(The --with-kernel path $withval is not a directory.)
542    fi
543    if ! test -r $withval/include/linux/version.h ; then
544       AC_MSG_ERROR(The kernel source tree must have been configured.)
545    fi
546    vers=`sed -n '/UTS_RELEASE/{; s/.*"\([0-9]\.[0-9]\).*".*/\1/; p; }' $withval/include/linux/version.h`
547    if ! grep -q UTS_RELEASE..2\\.4\\. $withval/include/linux/version.h ; then
548       AC_MSG_ERROR(The kernel source tree does not appear to be 2.4)
549    fi
550    k24_minor_ver=`echo $vers | cut -b 26- | sed -n 's/\"//p' | head -n 1`
551    tmp_k24_minor_ver=`echo $k24_minor_ver | grep \-`
552    if ! test "x$tmp_k24_minor_ver" = "x"; then
553       tmp_k24_minor_ver=`echo $k24_minor_ver | cut -d- -f1`
554       k24_minor_ver=$tmp_k24_minor_ver
555    fi
556    LINUX24_KERNEL_SRC="$withval" LINUX24_KERNEL_MINOR_VER="`echo $k24_minor_ver| cut -d'.' -f 1`"
557    BUILD_KERNEL=1
558    , LINUX24_KERNEL_SRC="" LINUX24_KERNEL_MINOR_VER="")
559
560AC_SUBST(BUILD_KERNEL)
561
562dnl now that we have the path to kernel source we can feature-test kernels.
563
564oldcflags=$CFLAGS
565if test -z "${LINUX_KERNEL_SRC}"  ; then
566        lk_src=${LINUX24_KERNEL_SRC}
567elif test -z "${LINUX24_KERNEL_SRC}"  ; then
568        lk_src=${LINUX_KERNEL_SRC}
569fi
570
571dnl some kernels (SLES9 2.6.5-7.191, for one) will pass the test for ki_dtor
572dnl but the resulting pvfs2.ko module will be built with internal
573dnl symbols (mmgrab and flush_icache_range). 
574dnl
575dnl if option not given, carry out the test.  Only certain kernels (like SLES
576dnl 9) will need --disable-kernel-aio
577
578AC_ARG_ENABLE(kernel-aio,
579  [  --disable-kernel-aio    Forcibly disable kernel aio],
580  [ enable_kernel_aio=$enableval ],
581  [ enable_kernel_aio=yes ]
582  )
583
584AC_ARG_ENABLE(kernel-sendfile,
585  [  --enable-kernel-sendfile
586                          **EXPERIMENTAL** Forcibly enable kernel sendfile],
587  [ enable_kernel_sendfile=$enableval ],
588  [ enable_kernel_sendfile=no ]
589  )
590
591if test -n "$lk_src" ; then
592    AX_KERNEL_FEATURES
593    AC_DEFINE(WITH_LINUX_KMOD, 1, [Define to build for linux kernel module userspace helper.])
594fi
595
596dnl
597dnl Enabling this option links pvfs2-client-core against libpvfs2-threaded.so.
598dnl Note that even without this option, pvfs2-client-core always requires
599dnl pthreads to run its remount thread.
600dnl
601AC_ARG_ENABLE([threaded-kmod-helper],
602[  --enable-threaded-kmod-helper
603                          **EXPERIMENTAL** Use threads in the kernel
604                          helper application],
605[ if test "x$enableval" = "xyes" ; then
606    THREADED_KMOD_HELPER=yes
607  fi
608])
609AC_SUBST(THREADED_KMOD_HELPER)
610
611dnl PAV configuration needs absolute location of source and build.
612dnl Linux-2.6 module needs absolute location of source, and uses the
613dnl relative location for soft links for out-of-tree builds.
614BUILD_ABSOLUTE_TOP=`pwd`
615SRC_RELATIVE_TOP=`echo $0 | sed -e "s|configure$||"`
616SRC_ABSOLUTE_TOP=`cd $SRC_RELATIVE_TOP ; pwd`
617
618AC_SUBST(LINUX_KERNEL_SRC)
619AC_SUBST(LINUX24_KERNEL_SRC)
620AC_SUBST(LINUX24_KERNEL_MINOR_VER)
621AC_SUBST(BUILD_ABSOLUTE_TOP)
622AC_SUBST(SRC_RELATIVE_TOP)
623AC_SUBST(SRC_ABSOLUTE_TOP)
624
625dnl Optimized code, but never override CFLAGS from command line or environment.
626AC_ARG_ENABLE(fast,
627[  --enable-fast           Disable optional debugging, enable optimizations.],
628[
629if test "x$USR_CFLAGS_SET" = "xno"; then
630    CFLAGS="$CFLAGS -DNDEBUG -O3 -DGOSSIP_DISABLE_DEBUG"
631fi
632])
633
634dnl
635dnl a function to check for FUSE
636dnl
637test_for_fuse()
638{
639  AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
640  if test "x$HAVE_PKGCONFIG" = "xyes" ; then
641    AC_MSG_CHECKING([for FUSE library])
642    if `pkg-config --exists fuse` ; then
643       AC_MSG_RESULT(yes)
644       FUSE_LDFLAGS=`pkg-config --libs fuse`
645       FUSE_CFLAGS=`pkg-config --cflags fuse`
646
647       AC_SUBST(FUSE_LDFLAGS)
648       AC_SUBST(FUSE_CFLAGS)
649       BUILD_FUSE="1"
650       AC_SUBST(BUILD_FUSE)
651    else
652            AC_MSG_ERROR([FUSE: FUSE library not found. Check LD_LIBRARY_PATH.])
653    fi
654  else
655          AC_MSG_ERROR(FUSE: pkg-config not available. Please install pkg-config.)
656  fi
657}
658
659dnl FUSE component
660AC_ARG_ENABLE(fuse,
661[  --enable-fuse           **EXPERIMENTAL** Enable FUSE component],
662[
663if test "x$enableval" = "xyes" ; then
664   test_for_fuse
665   CFLAGS="$CFLAGS -D__PVFS2_ENABLE_FUSE__"
666fi
667],
668)
669
670# default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast
671if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then
672    CFLAGS="$CFLAGS -g -O2"
673fi
674
675dnl Options that are not yet working
676dnl --------------------------------
677dnl AC_ARG_ENABLE(profiling,
678dnl [  --enable-profiling      Enable profiling (using gprof).                     *** not yet working ***],
679dnl CFLAGS="$CFLAGS -pg -fprofile-arcs",
680dnl )
681dnl
682dnl AC_ARG_ENABLE(coverage,
683dnl [  --enable-coverage       Enable coverage analysis (disables optimizations).  *** not yet working ***],
684dnl [ CFLAGS="$CFLAGS -g -pg -ftest-coverage -O0"
685dnl ENABLE_COVERAGE=1 ],
686dnl )
687
688AC_SUBST(ENABLE_COVERAGE)
689
690STRICT_CFLAGS=
691AC_ARG_ENABLE(strict,
692[  --enable-strict         Turn on strict compiler warnings],
693    STRICT_CFLAGS=1)
694AC_SUBST(STRICT_CFLAGS)
695
696dnl Check if user actually wants to see all our build output (compiles, links, etc.).
697AC_ARG_ENABLE(verbose-build,
698[  --enable-verbose-build  Enables full output during build process],
699QUIET_COMPILE=0,
700QUIET_COMPILE=1)
701
702AC_SUBST(QUIET_COMPILE)
703
704dnl
705dnl a function to check for epoll capabilities
706dnl
707test_for_epoll()
708{
709  AC_CHECK_HEADERS(sys/epoll.h)
710  AC_MSG_CHECKING(for epoll functions)
711  AC_TRY_LINK([#include <sys/epoll.h>], [
712        int fd;
713        fd = epoll_create(1);
714        close(fd);
715  ],
716     AC_MSG_RESULT(yes)
717     BUILD_EPOLL=1
718     AC_SUBST(BUILD_EPOLL),
719     AC_MSG_RESULT(no)
720  )
721}
722
723dnl optionally enable use of epoll() on Linux instead of poll()
724dnl optionally disable use of epoll() on Linux instead of poll()
725AC_ARG_ENABLE(epoll,
726[  --enable-epoll          Enable use of epoll for TCP/IP polling
727                          (epoll is enabled by default, this option
728                          ensures no checking is done for x-compiling)
729  --disable-epoll         Disable epoll, use poll instead],
730[
731   if test "x$enableval" = "xyes"; then
732        BUILD_EPOLL=1
733        AC_SUBST(BUILD_EPOLL)
734   fi
735],
736[
737  test_for_epoll
738])
739
740dnl enables a hack to print back traces out of segfault signal handler
741AC_ARG_ENABLE(segv-backtrace,
742[  --disable-segv-backtrace
743                          Disables back traces in segfault signal handler],,
744    AC_MSG_CHECKING(if segv backtrace capable)
745    AC_TRY_COMPILE([
746#include <execinfo.h>
747#define __USE_GNU
748#include <ucontext.h>
749#if !defined(REG_EIP) && !defined(REG_RIP)
750                   choke me
751#endif
752                   ], [],
753                   AC_MSG_RESULT(yes)
754                   PVFS2_SEGV_BACKTRACE=1,
755                   AC_MSG_RESULT(no)
756    )
757)
758AC_SUBST(PVFS2_SEGV_BACKTRACE)
759
760dnl shared or static client library
761AC_ARG_ENABLE(shared,
762[  --enable-shared         Build shared client library],
763[build_shared=$enableval], [build_shared=no])
764AC_SUBST(build_shared)
765
766dnl Bad things happen in the makefile if you happen to --disable-static
767dnl but do not --enable-shared.
768if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then
769    AC_MSG_ERROR([Must do --enable-shared or --enable-static or both.])
770fi
771
772dnl See if CC is a GNU compiler.  This may require a real test in future
773dnl versions of autoconf.  In 2.13 it is a side-effect of AC_PROG_CC.  First
774dnl check if it is an Intel compiler; those lie and claim to be gcc but are
775dnl not argument compatible
776INTELC=
777GNUC=
778AC_MSG_CHECKING(whether cc is an Intel compiler)
779AC_TRY_COMPILE([
780#ifndef __ICC
781       choke me
782#endif
783], [],
784    AC_MSG_RESULT(yes)
785    INTELC=1
786    ,
787    AC_MSG_RESULT(no)
788)
789if test "x$INTELC" = "x" ; then
790    if test "x$GCC" = "xyes" ; then
791       GNUC=1
792    fi
793fi
794AC_SUBST(INTELC)
795AC_SUBST(GNUC)
796
797AC_ARG_WITH(efence,
798[  --with-efence=<path>    Use electric fence for malloc debugging.],
799       if test "x$withval" != "xyes" ; then
800              LDFLAGS="${LDFLAGS} -L$withval"
801       fi
802       AC_CHECK_LIB(efence,malloc)
803)
804
805dnl Use compiled-in valgrind annotations?  Give the header path if
806dnl is not in the usual location.  It is common to install the header
807dnl in a subdirectory, so look for that too.  Leave the include path
808dnl in CPPFLAGS if it is not a standard header.
809AC_ARG_WITH(valgrind,
810[  --with-valgrind[=<path>]  Use valgrind annotations for debugging.], [
811    found=no
812    save_cppflags="$CPPFLAGS"
813    AC_MSG_CHECKING(for valgrind.h usability)
814    if test "x$withval" = xyes ; then
815        AC_COMPILE_IFELSE([#include <valgrind.h>], found=yes)
816        if test x$found = xno ; then
817            CPPFLAGS="$CPPFLAGS -I/usr/include/valgrind"
818            AC_COMPILE_IFELSE([#include <valgrind.h>], found=yes,
819                CPPFLAGS="$save_cppflags")
820        fi
821    else
822        for d in $withval $withval/include \
823                 $withval/valgrind $withval/include/valgrind
824        do
825            CPPFLAGS="$CPPFLAGS -I$d"
826            AC_COMPILE_IFELSE([#include <valgrind.h>], found=yes,
827                CPPFLAGS="$save_cppflags")
828            if test x$found = xyes ; then
829                break
830            fi
831        done
832    fi
833    AC_MSG_RESULT($found)
834    if test x$found = xyes ; then
835        AC_DEFINE(HAVE_VALGRIND_H, 1, Define if include file valgrind.h exists)
836    fi
837])
838
839if test "x$NEED_BERKELEY_DB" = "xyes" ; then
840    dnl
841    dnl make sure that required db development package is installed
842    dnl and valid; path can be specified at configure time
843    dnl
844    AC_ARG_WITH(db,
845           [  --with-db=<dir>         Location of installed DB package (default=/usr)],
846           [AX_BERKELEY_DB(${withval})],
847           [AX_BERKELEY_DB("")])
848fi
849dnl end of NEED_BERKELEY_DB section
850
851if test "x$BUILD_SERVER" = "x1"; then
852        dnl check if -lrt is required
853        AX_CHECK_NEEDS_LIBRT
854fi
855
856case "$host_os" in
857
858    *darwin*)
859        AC_DEFINE([TARGET_OS_DARWIN], 1, Define if on darwin)
860        TARGET_OS_DARWIN=1
861        AC_SUBST(TARGET_OS_DARWIN)
862    ;;
863    *linux*)
864        AC_DEFINE([TARGET_OS_LINUX], 1, Define if on linux)
865        TARGET_OS_LINUX=1
866        AC_SUBST(TARGET_OS_LINUX)
867    ;;
868esac
869
870AC_CHECK_HEADERS(netdb.h)
871AC_CHECK_HEADERS(arpa/inet.h)
872AC_CHECK_HEADERS(sys/socket.h)
873dnl check for gethostbyname function
874AC_MSG_CHECKING(for gethostbyname)
875oldcflags="$CFLAGS"
876CFLAGS="$USR_CFLAGS"
877AC_TRY_COMPILE([
878#include <netdb.h>
879], [
880gethostbyname("localhost");
881],
882AC_MSG_RESULT(yes)
883AC_DEFINE(HAVE_GETHOSTBYNAME, 1, Define if gethostbyname function exists),
884AC_MSG_RESULT(no)
885WARN_ABOUT_HOSTNAMES="yes")
886
887AC_MSG_CHECKING(for gethostbyaddr)
888AC_TRY_COMPILE([
889#include <netdb.h>
890], [
891struct sockaddr_in peer;
892gethostbyaddr((void *)&peer.sin_addr.s_addr, sizeof(struct in_addr), AF_INET);
893],
894AC_MSG_RESULT(yes)
895AC_DEFINE(HAVE_GETHOSTBYADDR, 1, Define if gethostbyaddr function exists),
896AC_MSG_RESULT(no)  )
897
898CFLAGS="$oldcflags"
899
900dnl allow disabling TCP BMI method
901BUILD_BMI_TCP=1
902AC_ARG_WITH(bmi-tcp,
903[  --without-bmi-tcp       Disable BMI TCP method],
904    if test -z "$withval" -o "$withval" = yes ; then
905        :
906    elif test "$withval" = no ; then
907        BUILD_BMI_TCP=
908    else
909        AC_MSG_ERROR([Option --with-tcp requires yes/no argument.])
910    fi
911)
912AC_SUBST(BUILD_BMI_TCP)
913
914dnl
915dnl Configure bmi_gm, if --with-gm or a variant given.
916dnl
917AX_GM
918
919dnl
920dnl Configure bmi_mx, if --with-mx or a variant given.
921dnl
922AX_MX
923
924dnl
925dnl Configure bmi_ib, if --with-ib or a variant given.
926dnl
927AX_IB
928
929dnl
930dnl Configure bmi_portals, if --with-portals or a variant given.
931dnl
932AX_PORTALS
933
934dnl
935dnl Configure bmi_zoid, if --with-zoid or a variant given.
936dnl
937AX_ZOID
938
939dnl
940dnl check if fgetxattr takes extra arguments
941AC_MSG_CHECKING([for fgetxattr extra arguments])
942AC_TRY_COMPILE([
943        #include <sys/types.h>
944        #ifdef HAVE_ATTR_XATTR_H
945        #include <attr/xattr.h>
946        #endif
947        #ifdef HAVE_SYS_XATTR_H
948        #include <sys/xattr.h>
949        #endif
950        ],
951        [
952        fgetxattr(0, 0, 0, 0, 0, 0);
953        ],
954        AC_MSG_RESULT(yes)
955        AC_DEFINE(HAVE_FGETXATTR_EXTRA_ARGS, 1, Define if fgetxattr takes position and option arguments),
956        AC_MSG_RESULT(no)
957)
958
959dnl
960dnl look for sysinfo header
961AC_CHECK_HEADER(sys/sysinfo.h,
962       AC_DEFINE(HAVE_SYSINFO, 1, Define if sysinfo.h is present)
963       )
964
965dnl for regular functions, add another AC_CHECK_FUNCS line
966AC_CHECK_FUNCS(strnlen)
967AC_CHECK_FUNCS(strtoull)
968AC_CHECK_FUNCS(strstr)
969AC_CHECK_FUNCS(fgetxattr)
970AC_CHECK_FUNCS(fsetxattr)
971
972dnl fgetxattr doesn't have a prototype on some systems
973AC_MSG_CHECKING([for fgetxattr prototype])
974AC_TRY_COMPILE([
975        #include <sys/types.h>
976        #ifdef HAVE_ATTR_XATTR_H
977        #include <attr/xattr.h>
978        #endif
979        #ifdef HAVE_SYS_XATTR_H
980        #include <sys/xattr.h>
981        #endif
982        char * fgetxattr(char *foo);
983        ], [],
984        AC_MSG_RESULT(no),
985        AC_MSG_RESULT(yes)
986        AC_DEFINE(HAVE_FGETXATTR_PROTOTYPE, 1, Define if system provides fgtxattr prototype)
987)
988
989dnl
990dnl check if fgetxattr takes extra arguments:  old systems that do not have any
991dnl sort of fgetxattr should fall back to our faked version.
992
993AC_MSG_CHECKING([for fgetxattr extra arguments])
994AC_TRY_COMPILE([
995        #include <sys/types.h>
996        #ifdef HAVE_ATTR_XATTR_H
997        #include <attr/xattr.h>
998        #endif
999        #ifdef HAVE_SYS_XATTR_H
1000        #include <sys/xattr.h>
1001        #endif
1002        ],
1003        [
1004        #ifdef HAVE_FGETXATTR_PROTOTYPE
1005        fgetxattr(0, 0, 0, 0, 0, 0);
1006        #else
1007        #  error
1008        #endif
1009        ],
1010        AC_MSG_RESULT(yes)
1011        AC_DEFINE(HAVE_FGETXATTR_EXTRA_ARGS, 1, Define if fgetxattr takes position and option arguments),
1012        AC_MSG_RESULT(no)
1013)
1014
1015AC_MSG_CHECKING([for fsetxattr extra arguments])
1016AC_TRY_COMPILE([
1017        #include <sys/types.h>
1018        #ifdef HAVE_ATTR_XATTR_H
1019        #include <attr/xattr.h>
1020        #endif
1021        #ifdef HAVE_SYS_XATTR_H
1022        #include <sys/xattr.h>
1023        #endif
1024        ],
1025        [
1026        fsetxattr(0, 0, 0, 0, 0, 0);
1027        ],
1028        AC_MSG_RESULT(yes)
1029        AC_DEFINE(HAVE_FSETXATTR_EXTRA_ARGS, 1, Define if fsetxattr takes position and option arguments),
1030        AC_MSG_RESULT(no)
1031)
1032
1033
1034dnl check for getmntent(), special test
1035AC_FUNC_GETMNTENT
1036
1037dnl if we use headers that might not be on every platform, add them here
1038AC_CHECK_HEADERS(malloc.h)
1039AC_CHECK_HEADERS(mntent.h)
1040
1041AC_ARG_ENABLE(static-server,
1042[  --enable-static-server  Builds the server static],
1043[ staticserver=$enableval ],
1044[ staticserver="no" ] )
1045
1046if test "$staticserver" = "yes"; then
1047        SERVER_LDFLAGS="$LDFLAGS -static"
1048else
1049        SERVER_LDFLAGS="$LDFLAGS -rdynamic"
1050fi
1051
1052AC_SUBST(SERVER_LDFLAGS)
1053
1054dnl this is a special case, used to key off options controlling gossip
1055dnl   backtrace capability
1056AC_CHECK_HEADERS(execinfo.h,
1057        LDFLAGS="$LDFLAGS -rdynamic"
1058        GOSSIP_ENABLE_BACKTRACE=1
1059)
1060AC_SUBST(GOSSIP_ENABLE_BACKTRACE)
1061
1062dnl --
1063dnl Check for SDL
1064AC_MSG_CHECKING([for SDL])
1065SDL_CONFIG=`which sdl-config 2> /dev/null`
1066if ! test -z "$SDL_CONFIG" && test -x "$SDL_CONFIG"; then
1067   AC_MSG_RESULT(yes)
1068   SDL_VERSION=`sdl-config --version`
1069   VISCFLAGS=`sdl-config --cflags`
1070   VISCLIBS=`sdl-config --libs`
1071
1072   dnl We also need SDL ttf support
1073   dnl only define BUILD_VIS if we have all required parts
1074   AC_CHECK_HEADERS(SDL_ttf.h,
1075       [BUILD_VIS="1"
1076        CPPFLAGS="$CPPFLAGS $VISCFLAGS"],
1077        [AC_CHECK_HEADERS(SDL/SDL_ttf.h,
1078            [BUILD_VIS="1"
1079            CPPFLAGS="$CPPFLAGS $VISCFLAGS"],)],
1080)
1081
1082   AC_SUBST(BUILD_VIS)
1083   AC_SUBST(VISCFLAGS)
1084   AC_SUBST(VISLIBS)
1085else
1086   AC_MSG_RESULT(no)
1087fi
1088
1089dnl Which form of strerror?
1090AC_MSG_CHECKING([for GNU-style strerror_r])
1091AC_TRY_COMPILE(
1092    [
1093        #include <string.h>
1094        extern char *strerror_r();
1095    ], [],
1096    AC_MSG_RESULT(yes)
1097    AC_DEFINE(HAVE_GNU_STRERROR_R, 1, Define if strerror_r is GNU-specific)
1098    ,
1099    AC_MSG_RESULT(no)
1100)
1101
1102dnl create any missing subdirectories that wouldn't be created
1103dnl by AC_OUTPUT below (which won't create intermediate dirs).
1104for d in src/apps src/io src/common src/client src/kernel \
1105       doc src/apps/kernel test; do
1106       install -d $d;
1107done
1108
1109dnl output final version of top level makefile and subdirectory
1110dnl    makefile includes
1111AC_OUTPUT(include/pvfs2.h
1112Makefile
1113module.mk
1114src/apps/admin/module.mk
1115src/apps/admin/pvfs2-config
1116src/apps/devel/module.mk
1117src/apps/karma/module.mk
1118src/apps/vis/module.mk
1119src/apps/fuse/module.mk
1120src/apps/kernel/linux/module.mk
1121src/apps/user/module.mk
1122src/io/trove/module.mk
1123src/io/trove/trove-handle-mgmt/module.mk
1124src/io/trove/trove-dbpf/module.mk
1125src/common/misc/module.mk
1126src/common/quickhash/module.mk
1127src/common/quicklist/module.mk
1128src/common/dotconf/module.mk
1129src/common/id-generator/module.mk
1130src/common/gossip/module.mk
1131src/common/gen-locks/module.mk
1132src/common/llist/module.mk
1133src/common/statecomp/module.mk
1134src/common/events/module.mk
1135src/common/mgmt/module.mk
1136src/io/bmi/module.mk
1137src/io/bmi/bmi_tcp/module.mk
1138src/io/bmi/bmi_gm/module.mk
1139src/io/bmi/bmi_mx/module.mk
1140src/io/bmi/bmi_ib/module.mk
1141src/io/bmi/bmi_portals/module.mk
1142src/io/bmi/bmi_zoid/module.mk
1143src/io/description/module.mk
1144src/io/flow/module.mk
1145src/io/flow/flowproto-bmi-trove/module.mk
1146src/io/flow/flowproto-template/module.mk
1147src/io/flow/flowproto-dump-offsets/module.mk
1148src/io/flow/flowproto-bmi-cache/module.mk
1149src/io/buffer/module.mk
1150src/io/job/module.mk
1151src/io/dev/module.mk
1152src/proto/module.mk
1153src/server/module.mk
1154src/server/request-scheduler/module.mk
1155src/client/sysint/module.mk
1156src/kernel/linux-2.6/Makefile
1157src/kernel/linux-2.4/Makefile
1158doc/module.mk
1159doc/coding/module.mk
1160doc/design/module.mk
1161doc/random/module.mk
1162examples/pvfs2-server.rc
1163doc/doxygen/pvfs2-doxygen.conf
1164)
1165
1166chmod +x $BUILD_ABSOLUTE_TOP/src/apps/admin/pvfs2-config
1167
1168# print a summary of the configuration information
1169if test "x$BUILD_BMI_ONLY" = "x1" ; then
1170        AC_MSG_RESULT()
1171        AC_MSG_RESULT([***** Displaying BMI configuration information *****])
1172        AC_MSG_RESULT([----------------------------------------------------])
1173        PKGSTR="BMI"
1174else
1175        AC_MSG_RESULT()
1176        AC_MSG_RESULT([***** Displaying PVFS Configuration Information *****])
1177        AC_MSG_RESULT([------------------------------------------------------])
1178        PKGSTR="PVFS2"
1179fi
1180
1181# print PVFS configs (not used by BMI)
1182if test "x$BUILD_BMI_ONLY" != "x1" ; then
1183
1184if test "x$BUILD_KARMA" = "x1" ; then
1185   AC_MSG_RESULT([PVFS2 configured to build karma gui               : yes])
1186else
1187   AC_MSG_RESULT([PVFS2 configured to build karma gui               :  no])
1188fi
1189
1190if test "x$ENABLE_COVERAGE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then
1191   AC_MSG_RESULT([PVFS2 configured to perform coverage analysis     : yes])
1192else
1193   AC_MSG_RESULT([PVFS2 configured to perform coverage analysis     :  no])
1194fi
1195
1196if test "x$MISC_TROVE_FLAGS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then
1197   AC_MSG_RESULT([PVFS2 configured for aio threaded callbacks       :  no])
1198else
1199   AC_MSG_RESULT([PVFS2 configured for aio threaded callbacks       : yes])
1200fi
1201
1202if test "x$BUILD_FUSE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then
1203   AC_MSG_RESULT([PVFS2 configured to use FUSE                      : yes])
1204else
1205   AC_MSG_RESULT([PVFS2 configured to use FUSE                      :  no])
1206fi
1207
1208if test "x$LINUX_KERNEL_SRC" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then
1209   AC_MSG_RESULT([PVFS2 configured for the 2.6.x kernel module      :  no])
1210else
1211   AC_MSG_RESULT([PVFS2 configured for the 2.6.x kernel module      : yes])
1212fi
1213
1214if test "x$LINUX24_KERNEL_SRC" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then
1215   AC_MSG_RESULT([PVFS2 configured for the 2.4.x kernel module      :  no])
1216else
1217   AC_MSG_RESULT([PVFS2 configured for the 2.4.x kernel module      : yes])
1218fi
1219
1220if test "x$MMAP_RA_CACHE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then
1221   AC_MSG_RESULT([PVFS2 configured for using the mmap-ra-cache      :  no])
1222else
1223   AC_MSG_RESULT([PVFS2 configured for using the mmap-ra-cache      : yes])
1224fi
1225
1226if test "x$REDHAT_RELEASE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then
1227   AC_MSG_RESULT([PVFS2 will use workaround for redhat 2.4 kernels  :  no])
1228else
1229   AC_MSG_RESULT([PVFS2 will use workaround for redhat 2.4 kernels  : yes])
1230fi
1231
1232if test "x$NPTL_WORKAROUND" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then
1233   AC_MSG_RESULT([PVFS2 will use workaround for buggy NPTL          :  no])
1234else
1235   AC_MSG_RESULT([PVFS2 will use workaround for buggy NPTL          : yes])
1236fi
1237
1238if test "x$BUILD_SERVER" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then
1239   AC_MSG_RESULT([PVFS2 server will be built                        : yes])
1240else
1241   AC_MSG_RESULT([PVFS2 server will be built                        :  no])
1242
1243fi
1244
1245else
1246
1247# print BMI and PVFS configs
1248if test "x$THREAD_LIB" = "x"; then
1249   AC_MSG_RESULT([$PKGSTR configured for a thread-safe client library :  no])
1250else
1251   AC_MSG_RESULT([$PKGSTR configured for a thread-safe client library : yes])
1252fi
1253
1254if test "x$BUILD_EPOLL" = "x1" ; then
1255   AC_MSG_RESULT([$PKGSTR configured to use epoll                     : yes])
1256else
1257   AC_MSG_RESULT([$PKGSTR configured to use epoll                     :  no])
1258fi
1259
1260if test "x$TRUSTED_CONNECTIONS" = "x" ; then
1261        AC_MSG_RESULT([$PKGSTR configured for using trusted connections    :  no])
1262else
1263        AC_MSG_RESULT([$PKGSTR configured for using trusted connections    : yes])
1264fi
1265
1266fi # end of BMI/PVFS config display
1267
1268if test "x$WARN_ABOUT_HOSTNAMES" = "xyes" ; then
1269   AC_MSG_RESULT(WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION.)
1270fi
1271
1272
1273dnl
1274dnl Warn about potential slowness if using a "fast" network along with
1275dnl TCP.  Polling with timeout in BMI is implemented by sequentially asking
1276dnl each device to poll for half of the timeout.  This leads to a fixed 5 ms
1277dnl delay in the TCP device before the IB device can be queried, for instance.
1278dnl When traffic will only appear on one device, suggest that TCP be disabled.
1279dnl But leave TCP as default on, certainly, as that is what most people want.
1280dnl
1281if test x$BUILD_GM = x1 -o x$BUILD_MX = x1 -o x$BUILD_IB = x1 -o \
1282        x$BUILD_OPENIB = x1 -o x$BUILD_PORTALS = x1 -o x$BUILD_ZOID = x1 ; then
1283    if test x$BUILD_BMI_TCP = x1 ; then
1284        AC_MSG_WARN([You have selected to build $PKGSTR to use a "fast" network
1285                    interface, but have not disabled TCP.  The way this is
1286                    currently implemented will lead to rather slow response
1287                    times on the fast interface.  Suggest you configure with
1288                    "--without-bmi-tcp" for the best performance.])
1289    fi
1290fi
1291
1292AC_MSG_RESULT()
1293AC_MSG_RESULT([$PKGSTR version string: $PVFS2_VERSION])
1294
1295AC_MSG_RESULT()
Note: See TracBrowser for help on using the browser.