| 1 | dnl ************************************************************** |
|---|
| 2 | dnl PVFS2 AUTOCONF SCRIPT |
|---|
| 3 | dnl |
|---|
| 4 | dnl Process this file with autoconf to produce a configure script. |
|---|
| 5 | dnl You may need to use autoheader as well if changing any DEFINEs |
|---|
| 6 | |
|---|
| 7 | dnl sanity checks, output header, location of scripts used here |
|---|
| 8 | AC_INIT(include/pvfs2-types.h) |
|---|
| 9 | AC_PREREQ(2.59) |
|---|
| 10 | AC_CONFIG_AUX_DIR(maint/config) |
|---|
| 11 | |
|---|
| 12 | dnl |
|---|
| 13 | dnl for test builds, insert the build date and time information into |
|---|
| 14 | dnl into the version; for official releases, clear the PVFS2_PRE line |
|---|
| 15 | dnl |
|---|
| 16 | dnl PVFS2 versioning information. |
|---|
| 17 | dnl An @ in the date string can confuse e.g. scp and 'make kmod' |
|---|
| 18 | CONFIGURE_TIME=`date -u +"%Y-%m-%d-%H%M%S"` |
|---|
| 19 | PVFS2_VERSION_MAJOR=2 |
|---|
| 20 | PVFS2_VERSION_MINOR=8 |
|---|
| 21 | PVFS2_VERSION_SUB=2 |
|---|
| 22 | PVFS2_VERSION_RELEASE="orangefs-20100920" |
|---|
| 23 | #PVFS2_PRE="" |
|---|
| 24 | #PVFS2_VERSION_PRE="-orangefs-$CONFIGURE_TIME" |
|---|
| 25 | |
|---|
| 26 | PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE |
|---|
| 27 | AC_SUBST(PVFS2_VERSION) |
|---|
| 28 | AC_DEFINE_UNQUOTED(PVFS2_VERSION_MAJOR, $PVFS2_VERSION_MAJOR, major version number) |
|---|
| 29 | AC_DEFINE_UNQUOTED(PVFS2_VERSION_MINOR, $PVFS2_VERSION_MINOR, minor version number) |
|---|
| 30 | AC_DEFINE_UNQUOTED(PVFS2_VERSION_SUB, $PVFS2_VERSION_SUB, sub version number) |
|---|
| 31 | AC_DEFINE_UNQUOTED(PVFS2_VERSION_RELEASE, $PVFS2_VERSION_RELEASE, release version number) |
|---|
| 32 | AC_SUBST(PVFS2_VERSION_MAJOR) |
|---|
| 33 | AC_SUBST(PVFS2_VERSION_MINOR) |
|---|
| 34 | AC_SUBST(PVFS2_VERSION_SUB) |
|---|
| 35 | AC_SUBST(PVFS2_VERSION_RELEASE) |
|---|
| 36 | |
|---|
| 37 | dnl BMI_ONLY_TAG |
|---|
| 38 | |
|---|
| 39 | dnl Checks for host type |
|---|
| 40 | dnl Ensures we can compile on this OS |
|---|
| 41 | AC_CANONICAL_HOST |
|---|
| 42 | |
|---|
| 43 | USR_CFLAGS=$CFLAGS |
|---|
| 44 | if test "x$USR_CFLAGS" = "x"; then |
|---|
| 45 | USR_CFLAGS_SET=no |
|---|
| 46 | fi |
|---|
| 47 | |
|---|
| 48 | AC_CONFIG_HEADER(pvfs2-config.h) |
|---|
| 49 | |
|---|
| 50 | AC_CHECK_HEADER([pwd.h], |
|---|
| 51 | [AC_DEFINE(HAVE_GETPWUID, 1, Define if pwd.h exists)]) |
|---|
| 52 | AC_CHECK_HEADER([sys/vfs.h], |
|---|
| 53 | [AC_DEFINE(HAVE_SYS_VFS_H, 1, Define if sys/vfs.h exists)]) |
|---|
| 54 | AC_CHECK_HEADER([sys/mount.h], |
|---|
| 55 | [AC_DEFINE(HAVE_SYS_MOUNT_H, 1, Define if sys/mount.h exists)]) |
|---|
| 56 | |
|---|
| 57 | AC_CHECK_HEADERS([mntent.h, fstab.h]) |
|---|
| 58 | |
|---|
| 59 | AC_CHECK_HEADERS(stdarg.h) |
|---|
| 60 | |
|---|
| 61 | AC_CHECK_HEADERS(attr/xattr.h) |
|---|
| 62 | AC_CHECK_HEADERS(sys/xattr.h) |
|---|
| 63 | |
|---|
| 64 | AC_CHECK_SIZEOF([long int]) |
|---|
| 65 | |
|---|
| 66 | dnl Check for utilities that we need during the build process |
|---|
| 67 | AC_PROG_INSTALL |
|---|
| 68 | AC_PROG_CC |
|---|
| 69 | |
|---|
| 70 | AC_MSG_CHECKING([for required gcc]) |
|---|
| 71 | if test "x$GCC" = "x"; then |
|---|
| 72 | AC_MSG_ERROR(no) |
|---|
| 73 | fi |
|---|
| 74 | |
|---|
| 75 | CFLAGS=$USR_CFLAGS |
|---|
| 76 | |
|---|
| 77 | AC_PROG_CPP |
|---|
| 78 | AC_CHECK_PROG(HAVE_PERL, perl, yes, no) |
|---|
| 79 | AC_CHECK_PROG(HAVE_FIND, find, yes, no) |
|---|
| 80 | AC_CHECK_PROG(HAVE_BISON, bison, yes, no) |
|---|
| 81 | AC_CHECK_PROG(HAVE_FLEX, flex, yes, no) |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | AC_MSG_CHECKING([for required Math::BigInt perl module]) |
|---|
| 85 | perl -e "use Math::BigInt" 2>&1 > /dev/null |
|---|
| 86 | if test $? != 0; then |
|---|
| 87 | AC_MSG_ERROR(no) |
|---|
| 88 | else |
|---|
| 89 | AC_MSG_RESULT(yes) |
|---|
| 90 | fi |
|---|
| 91 | |
|---|
| 92 | if test $host != $build; then |
|---|
| 93 | AC_CHECK_PROGS(BUILD_CC, gcc cc) |
|---|
| 94 | else |
|---|
| 95 | BUILD_CC=$CC |
|---|
| 96 | BUILD_CFLAGS=$BUILD_CFLAGS |
|---|
| 97 | BUILD_LDFLAGS=$BUILD_LDFLAGS |
|---|
| 98 | fi |
|---|
| 99 | |
|---|
| 100 | AC_SUBST(BUILD_CC) |
|---|
| 101 | AC_SUBST(BUILD_CFLAGS) |
|---|
| 102 | AC_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 | |
|---|
| 156 | dnl a mechanism to turn off threads in the client library |
|---|
| 157 | AC_MSG_CHECKING([for client library thread safety support]) |
|---|
| 158 | AC_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) |
|---|
| 164 | fi], |
|---|
| 165 | [ LIBCFLAGS="$LIBCFLAGS -D__GEN_POSIX_LOCKING__" |
|---|
| 166 | THREAD_LIB="-lpthread" |
|---|
| 167 | AC_MSG_RESULT(yes) ]) |
|---|
| 168 | |
|---|
| 169 | AC_SUBST(LIBCFLAGS) |
|---|
| 170 | AC_SUBST(THREAD_LIB) |
|---|
| 171 | |
|---|
| 172 | dnl a mechanism to disable building the PVFS2 server |
|---|
| 173 | AC_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 |
|---|
| 178 | else |
|---|
| 179 | BUILD_SERVER="" |
|---|
| 180 | fi], |
|---|
| 181 | BUILD_SERVER=1 |
|---|
| 182 | NEED_BERKELEY_DB=yes) |
|---|
| 183 | AC_SUBST(BUILD_SERVER) |
|---|
| 184 | |
|---|
| 185 | AC_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 | |
|---|
| 191 | dnl a mechanism to turn off memory usage statistics in karma (may be |
|---|
| 192 | dnl confusing for some classes of users) |
|---|
| 193 | AC_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__" |
|---|
| 198 | fi] |
|---|
| 199 | ,) |
|---|
| 200 | |
|---|
| 201 | dnl build only the bmi library |
|---|
| 202 | AC_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 |
|---|
| 206 | fi] |
|---|
| 207 | ,) |
|---|
| 208 | AC_SUBST(BUILD_BMI_ONLY) |
|---|
| 209 | |
|---|
| 210 | dnl if we're only building the BMI lib, disable checks for server and DB. |
|---|
| 211 | if 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) |
|---|
| 216 | fi |
|---|
| 217 | |
|---|
| 218 | dnl a mechanism to turn off perf counters |
|---|
| 219 | AC_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__" |
|---|
| 223 | fi] |
|---|
| 224 | ,) |
|---|
| 225 | |
|---|
| 226 | dnl a mechanism to turn on mmap-readahead caching (for kernel interface) |
|---|
| 227 | MMAP_RA_CACHE="" |
|---|
| 228 | AC_ARG_ENABLE(mmap-racache, |
|---|
| 229 | [ --enable-mmap-racache **EXPERIMENTAL** Enables mmap-readahead in kernel |
|---|
| 230 | interface], |
|---|
| 231 | [if test "x$enableval" = "xyes" ; then |
|---|
| 232 | MMAP_RA_CACHE="-DUSE_MMAP_RA_CACHE" |
|---|
| 233 | fi] |
|---|
| 234 | ,) |
|---|
| 235 | AC_SUBST(MMAP_RA_CACHE) |
|---|
| 236 | |
|---|
| 237 | dnl See if the --enable-trusted-connections option was given to configure |
|---|
| 238 | AC_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 |
|---|
| 243 | TRUSTED_CONNECTIONS="-DUSE_TRUSTED" |
|---|
| 244 | fi], |
|---|
| 245 | ) |
|---|
| 246 | AC_SUBST(TRUSTED_CONNECTIONS) |
|---|
| 247 | |
|---|
| 248 | |
|---|
| 249 | dnl a function to check if we have the required gtk stuff for the |
|---|
| 250 | dnl karma gui |
|---|
| 251 | test_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 | |
|---|
| 271 | dnl optionally disable building the karma gui |
|---|
| 272 | AC_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 | |
|---|
| 281 | dnl shared or static client library (see --enable-shared below) |
|---|
| 282 | AC_ARG_ENABLE(static, |
|---|
| 283 | [ --disable-static Do not build static client library], |
|---|
| 284 | [build_static=$enableval], [build_static=yes]) |
|---|
| 285 | AC_SUBST(build_static) |
|---|
| 286 | |
|---|
| 287 | dnl NOTE: removing the linux-gnu host check for now; we may want to put it back |
|---|
| 288 | dnl before releaseing any code, though... -Phil |
|---|
| 289 | dnl |
|---|
| 290 | dnl AC_MSG_CHECKING(whether we know how to compile for this OS) |
|---|
| 291 | dnl if test x$host_os != xlinux-gnu; then AC_MSG_ERROR($host_os not supported.) |
|---|
| 292 | dnl else AC_MSG_RESULT(yes) |
|---|
| 293 | dnl fi |
|---|
| 294 | |
|---|
| 295 | dnl some redhat 2.4 kernels have a lot of 2.6 features, so we need to take |
|---|
| 296 | dnl special measures to accomodate those hacked kernels. However, we do not |
|---|
| 297 | dnl need to take these workarounds if someone is building a stock kernel.org |
|---|
| 298 | dnl kernel. |
|---|
| 299 | |
|---|
| 300 | dnl was the configure option passed in? |
|---|
| 301 | set_redhat24=0 |
|---|
| 302 | dnl what was the configure option set to? |
|---|
| 303 | use_redhat24=0 |
|---|
| 304 | |
|---|
| 305 | AC_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 | |
|---|
| 315 | dnl some systems (ie, RedHat EL 3 prior to Update 2) have buggy NPTL/Pthread |
|---|
| 316 | dnl implementations. We accomodate this with a server stub script hack that |
|---|
| 317 | dnl attempts to disable NPTL and fall back to old fashioned Linux Threads. |
|---|
| 318 | |
|---|
| 319 | dnl was the configure option passed in? |
|---|
| 320 | set_nptl_workaround=0 |
|---|
| 321 | dnl what was the configure option set to? |
|---|
| 322 | use_nptl_workaround=0 |
|---|
| 323 | |
|---|
| 324 | AC_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 | |
|---|
| 335 | dnl We check for the following redhat tags, as they all have similarly |
|---|
| 336 | dnl modified 2.4.x kernels |
|---|
| 337 | dnl |
|---|
| 338 | RHTAG1="Red Hat Linux release 9" |
|---|
| 339 | RHTAG2="Red Hat Enterprise Linux WS release 3" |
|---|
| 340 | RHTAG3="Red Hat Enterprise Linux AS release 3" |
|---|
| 341 | RHTAG4="Red Hat Enterprise Linux ES release 3" |
|---|
| 342 | RHTAG5="Red Hat Linux Advanced Server release 2.1AS" |
|---|
| 343 | RHTAG6="Fedora Core release 1 (Yarrow)" |
|---|
| 344 | |
|---|
| 345 | |
|---|
| 346 | dnl we won't be able to catch all cases, but see if we can |
|---|
| 347 | dnl get the majority of platforms where we might need to work around |
|---|
| 348 | dnl backported features. Basically we give up if running on these redhat |
|---|
| 349 | dnl versions |
|---|
| 350 | |
|---|
| 351 | REDHAT_RELEASE="" |
|---|
| 352 | if 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 |
|---|
| 384 | fi |
|---|
| 385 | |
|---|
| 386 | dnl some non-redhat kernels (like whitebox linux and centos) rebuild |
|---|
| 387 | dnl rhel and give the distribution a different name, so if the user sets |
|---|
| 388 | dnl "enable-redhat24", then use it no matter what /etc/redhat-release might say |
|---|
| 389 | |
|---|
| 390 | if test "$use_redhat24" = 1 ; then |
|---|
| 391 | REDHAT_RELEASE="-DREDHAT_RELEASE_9" |
|---|
| 392 | fi |
|---|
| 393 | AC_SUBST(REDHAT_RELEASE) |
|---|
| 394 | |
|---|
| 395 | if test "$use_nptl_workaround" = 1 ; then |
|---|
| 396 | NPTL_WORKAROUND="1" |
|---|
| 397 | fi |
|---|
| 398 | AC_SUBST(NPTL_WORKAROUND) |
|---|
| 399 | |
|---|
| 400 | use_aio_thcb=1 |
|---|
| 401 | AC_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 | |
|---|
| 407 | dnl there used to be a big hairy test in here, back when glibc-2.3.0 and |
|---|
| 408 | dnl glibc-2.3.1 had buggy aio callbacks. That test was broken because it |
|---|
| 409 | dnl assumed just linux, and could not handle glibc-2.4.x (or newer). Rely on |
|---|
| 410 | dnl aio-threaded-callbacks, perhaps with a blacklist of distros that have the |
|---|
| 411 | dnl broken glibc. |
|---|
| 412 | |
|---|
| 413 | MISC_TROVE_FLAGS="" |
|---|
| 414 | if test $use_aio_thcb = 1 ; then |
|---|
| 415 | MISC_TROVE_FLAGS="-D__PVFS2_TROVE_AIO_THREADED__" |
|---|
| 416 | fi |
|---|
| 417 | AC_SUBST(MISC_TROVE_FLAGS) |
|---|
| 418 | |
|---|
| 419 | dnl Check for AIO's aiocb->__error_code field (linux has it, OS X doesn't) |
|---|
| 420 | AC_MSG_CHECKING([for __error_code field in aiocb struct]) |
|---|
| 421 | AC_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 | |
|---|
| 435 | dnl Check for AIO's aiocb->__return_value field (linux has it, OS X doesn't) |
|---|
| 436 | AC_MSG_CHECKING([for __return_value field in aiocb struct]) |
|---|
| 437 | AC_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 | ) |
|---|
| 450 | dnl Check byte ordering |
|---|
| 451 | AC_C_BIGENDIAN |
|---|
| 452 | |
|---|
| 453 | dnl Check size of pointer type; needed by id-generator |
|---|
| 454 | AC_CHECK_SIZEOF(void *) |
|---|
| 455 | |
|---|
| 456 | dnl Options for debugging |
|---|
| 457 | dnl This particular one enables tracing of memory allocation and |
|---|
| 458 | dnl freeing with the mtrace tool |
|---|
| 459 | AC_ARG_WITH(mtrace, |
|---|
| 460 | [ --with-mtrace Use mtrace (must set MALLOC_TRACE to output file)], |
|---|
| 461 | CFLAGS="$CFLAGS -include mcheck.h" |
|---|
| 462 | AC_DEFINE(WITH_MTRACE, 1, Define if mtrace memory leak detection was enabled) |
|---|
| 463 | ) |
|---|
| 464 | |
|---|
| 465 | dnl This particular one enables berkeley db to emit detected errors |
|---|
| 466 | AC_ARG_WITH(berkdb-debug, |
|---|
| 467 | [ --with-berkdb-debug Use berkeley db error reporting (if detected).], |
|---|
| 468 | AC_DEFINE(BERKDB_ERROR_REPORTING, 1, Define if berkeley db error reporting was enabled) |
|---|
| 469 | ) |
|---|
| 470 | |
|---|
| 471 | TAU_INCS= |
|---|
| 472 | BUILD_TAU= |
|---|
| 473 | |
|---|
| 474 | dnl use the tau trace library |
|---|
| 475 | AC_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 | |
|---|
| 494 | AC_SUBST(TAU_INCS) |
|---|
| 495 | AC_SUBST(BUILD_TAU) |
|---|
| 496 | |
|---|
| 497 | BUILD_KERNEL= |
|---|
| 498 | |
|---|
| 499 | dnl |
|---|
| 500 | dnl Enables the kernel module to build if the appropriate |
|---|
| 501 | dnl linux-2.6.x path is specified |
|---|
| 502 | dnl Make sure this is a usable kernel source tree too. |
|---|
| 503 | dnl |
|---|
| 504 | AC_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 | |
|---|
| 530 | dnl |
|---|
| 531 | dnl Enables the kernel module to build if the appropriate |
|---|
| 532 | dnl linux-2.4.x path is specified |
|---|
| 533 | dnl Make sure this is a usable kernel source tree too. |
|---|
| 534 | dnl |
|---|
| 535 | AC_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 | |
|---|
| 560 | AC_SUBST(BUILD_KERNEL) |
|---|
| 561 | |
|---|
| 562 | dnl now that we have the path to kernel source we can feature-test kernels. |
|---|
| 563 | |
|---|
| 564 | oldcflags=$CFLAGS |
|---|
| 565 | if test -z "${LINUX_KERNEL_SRC}" ; then |
|---|
| 566 | lk_src=${LINUX24_KERNEL_SRC} |
|---|
| 567 | elif test -z "${LINUX24_KERNEL_SRC}" ; then |
|---|
| 568 | lk_src=${LINUX_KERNEL_SRC} |
|---|
| 569 | fi |
|---|
| 570 | |
|---|
| 571 | dnl some kernels (SLES9 2.6.5-7.191, for one) will pass the test for ki_dtor |
|---|
| 572 | dnl but the resulting pvfs2.ko module will be built with internal |
|---|
| 573 | dnl symbols (mmgrab and flush_icache_range). |
|---|
| 574 | dnl |
|---|
| 575 | dnl if option not given, carry out the test. Only certain kernels (like SLES |
|---|
| 576 | dnl 9) will need --disable-kernel-aio |
|---|
| 577 | |
|---|
| 578 | AC_ARG_ENABLE(kernel-aio, |
|---|
| 579 | [ --disable-kernel-aio Forcibly disable kernel aio], |
|---|
| 580 | [ enable_kernel_aio=$enableval ], |
|---|
| 581 | [ enable_kernel_aio=yes ] |
|---|
| 582 | ) |
|---|
| 583 | |
|---|
| 584 | AC_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 | |
|---|
| 591 | if 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.]) |
|---|
| 594 | fi |
|---|
| 595 | |
|---|
| 596 | dnl |
|---|
| 597 | dnl Enabling this option links pvfs2-client-core against libpvfs2-threaded.so. |
|---|
| 598 | dnl Note that even without this option, pvfs2-client-core always requires |
|---|
| 599 | dnl pthreads to run its remount thread. |
|---|
| 600 | dnl |
|---|
| 601 | AC_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 | ]) |
|---|
| 609 | AC_SUBST(THREADED_KMOD_HELPER) |
|---|
| 610 | |
|---|
| 611 | dnl PAV configuration needs absolute location of source and build. |
|---|
| 612 | dnl Linux-2.6 module needs absolute location of source, and uses the |
|---|
| 613 | dnl relative location for soft links for out-of-tree builds. |
|---|
| 614 | BUILD_ABSOLUTE_TOP=`pwd` |
|---|
| 615 | SRC_RELATIVE_TOP=`echo $0 | sed -e "s|configure$||"` |
|---|
| 616 | SRC_ABSOLUTE_TOP=`cd $SRC_RELATIVE_TOP ; pwd` |
|---|
| 617 | |
|---|
| 618 | AC_SUBST(LINUX_KERNEL_SRC) |
|---|
| 619 | AC_SUBST(LINUX24_KERNEL_SRC) |
|---|
| 620 | AC_SUBST(LINUX24_KERNEL_MINOR_VER) |
|---|
| 621 | AC_SUBST(BUILD_ABSOLUTE_TOP) |
|---|
| 622 | AC_SUBST(SRC_RELATIVE_TOP) |
|---|
| 623 | AC_SUBST(SRC_ABSOLUTE_TOP) |
|---|
| 624 | |
|---|
| 625 | dnl Optimized code, but never override CFLAGS from command line or environment. |
|---|
| 626 | AC_ARG_ENABLE(fast, |
|---|
| 627 | [ --enable-fast Disable optional debugging, enable optimizations.], |
|---|
| 628 | [ |
|---|
| 629 | if test "x$USR_CFLAGS_SET" = "xno"; then |
|---|
| 630 | CFLAGS="$CFLAGS -DNDEBUG -O3 -DGOSSIP_DISABLE_DEBUG" |
|---|
| 631 | fi |
|---|
| 632 | ]) |
|---|
| 633 | |
|---|
| 634 | dnl |
|---|
| 635 | dnl a function to check for FUSE |
|---|
| 636 | dnl |
|---|
| 637 | test_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 | |
|---|
| 659 | dnl FUSE component |
|---|
| 660 | AC_ARG_ENABLE(fuse, |
|---|
| 661 | [ --enable-fuse **EXPERIMENTAL** Enable FUSE component], |
|---|
| 662 | [ |
|---|
| 663 | if test "x$enableval" = "xyes" ; then |
|---|
| 664 | test_for_fuse |
|---|
| 665 | CFLAGS="$CFLAGS -D__PVFS2_ENABLE_FUSE__" |
|---|
| 666 | fi |
|---|
| 667 | ], |
|---|
| 668 | ) |
|---|
| 669 | |
|---|
| 670 | # default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast |
|---|
| 671 | if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then |
|---|
| 672 | CFLAGS="$CFLAGS -g -O2" |
|---|
| 673 | fi |
|---|
| 674 | |
|---|
| 675 | dnl Options that are not yet working |
|---|
| 676 | dnl -------------------------------- |
|---|
| 677 | dnl AC_ARG_ENABLE(profiling, |
|---|
| 678 | dnl [ --enable-profiling Enable profiling (using gprof). *** not yet working ***], |
|---|
| 679 | dnl CFLAGS="$CFLAGS -pg -fprofile-arcs", |
|---|
| 680 | dnl ) |
|---|
| 681 | dnl |
|---|
| 682 | dnl AC_ARG_ENABLE(coverage, |
|---|
| 683 | dnl [ --enable-coverage Enable coverage analysis (disables optimizations). *** not yet working ***], |
|---|
| 684 | dnl [ CFLAGS="$CFLAGS -g -pg -ftest-coverage -O0" |
|---|
| 685 | dnl ENABLE_COVERAGE=1 ], |
|---|
| 686 | dnl ) |
|---|
| 687 | |
|---|
| 688 | AC_SUBST(ENABLE_COVERAGE) |
|---|
| 689 | |
|---|
| 690 | STRICT_CFLAGS= |
|---|
| 691 | AC_ARG_ENABLE(strict, |
|---|
| 692 | [ --enable-strict Turn on strict compiler warnings], |
|---|
| 693 | STRICT_CFLAGS=1) |
|---|
| 694 | AC_SUBST(STRICT_CFLAGS) |
|---|
| 695 | |
|---|
| 696 | dnl Check if user actually wants to see all our build output (compiles, links, etc.). |
|---|
| 697 | AC_ARG_ENABLE(verbose-build, |
|---|
| 698 | [ --enable-verbose-build Enables full output during build process], |
|---|
| 699 | QUIET_COMPILE=0, |
|---|
| 700 | QUIET_COMPILE=1) |
|---|
| 701 | |
|---|
| 702 | AC_SUBST(QUIET_COMPILE) |
|---|
| 703 | |
|---|
| 704 | dnl |
|---|
| 705 | dnl a function to check for epoll capabilities |
|---|
| 706 | dnl |
|---|
| 707 | test_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 | |
|---|
| 723 | dnl optionally enable use of epoll() on Linux instead of poll() |
|---|
| 724 | dnl optionally disable use of epoll() on Linux instead of poll() |
|---|
| 725 | AC_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 | |
|---|
| 740 | dnl enables a hack to print back traces out of segfault signal handler |
|---|
| 741 | AC_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 | ) |
|---|
| 758 | AC_SUBST(PVFS2_SEGV_BACKTRACE) |
|---|
| 759 | |
|---|
| 760 | dnl shared or static client library |
|---|
| 761 | AC_ARG_ENABLE(shared, |
|---|
| 762 | [ --enable-shared Build shared client library], |
|---|
| 763 | [build_shared=$enableval], [build_shared=no]) |
|---|
| 764 | AC_SUBST(build_shared) |
|---|
| 765 | |
|---|
| 766 | dnl Bad things happen in the makefile if you happen to --disable-static |
|---|
| 767 | dnl but do not --enable-shared. |
|---|
| 768 | if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then |
|---|
| 769 | AC_MSG_ERROR([Must do --enable-shared or --enable-static or both.]) |
|---|
| 770 | fi |
|---|
| 771 | |
|---|
| 772 | dnl See if CC is a GNU compiler. This may require a real test in future |
|---|
| 773 | dnl versions of autoconf. In 2.13 it is a side-effect of AC_PROG_CC. First |
|---|
| 774 | dnl check if it is an Intel compiler; those lie and claim to be gcc but are |
|---|
| 775 | dnl not argument compatible |
|---|
| 776 | INTELC= |
|---|
| 777 | GNUC= |
|---|
| 778 | AC_MSG_CHECKING(whether cc is an Intel compiler) |
|---|
| 779 | AC_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 | ) |
|---|
| 789 | if test "x$INTELC" = "x" ; then |
|---|
| 790 | if test "x$GCC" = "xyes" ; then |
|---|
| 791 | GNUC=1 |
|---|
| 792 | fi |
|---|
| 793 | fi |
|---|
| 794 | AC_SUBST(INTELC) |
|---|
| 795 | AC_SUBST(GNUC) |
|---|
| 796 | |
|---|
| 797 | AC_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 | |
|---|
| 805 | dnl Use compiled-in valgrind annotations? Give the header path if |
|---|
| 806 | dnl is not in the usual location. It is common to install the header |
|---|
| 807 | dnl in a subdirectory, so look for that too. Leave the include path |
|---|
| 808 | dnl in CPPFLAGS if it is not a standard header. |
|---|
| 809 | AC_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 | |
|---|
| 839 | if 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("")]) |
|---|
| 848 | fi |
|---|
| 849 | dnl end of NEED_BERKELEY_DB section |
|---|
| 850 | |
|---|
| 851 | if test "x$BUILD_SERVER" = "x1"; then |
|---|
| 852 | dnl check if -lrt is required |
|---|
| 853 | AX_CHECK_NEEDS_LIBRT |
|---|
| 854 | fi |
|---|
| 855 | |
|---|
| 856 | case "$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 | ;; |
|---|
| 868 | esac |
|---|
| 869 | |
|---|
| 870 | AC_CHECK_HEADERS(netdb.h) |
|---|
| 871 | AC_CHECK_HEADERS(arpa/inet.h) |
|---|
| 872 | AC_CHECK_HEADERS(sys/socket.h) |
|---|
| 873 | dnl check for gethostbyname function |
|---|
| 874 | AC_MSG_CHECKING(for gethostbyname) |
|---|
| 875 | oldcflags="$CFLAGS" |
|---|
| 876 | CFLAGS="$USR_CFLAGS" |
|---|
| 877 | AC_TRY_COMPILE([ |
|---|
| 878 | #include <netdb.h> |
|---|
| 879 | ], [ |
|---|
| 880 | gethostbyname("localhost"); |
|---|
| 881 | ], |
|---|
| 882 | AC_MSG_RESULT(yes) |
|---|
| 883 | AC_DEFINE(HAVE_GETHOSTBYNAME, 1, Define if gethostbyname function exists), |
|---|
| 884 | AC_MSG_RESULT(no) |
|---|
| 885 | WARN_ABOUT_HOSTNAMES="yes") |
|---|
| 886 | |
|---|
| 887 | AC_MSG_CHECKING(for gethostbyaddr) |
|---|
| 888 | AC_TRY_COMPILE([ |
|---|
| 889 | #include <netdb.h> |
|---|
| 890 | ], [ |
|---|
| 891 | struct sockaddr_in peer; |
|---|
| 892 | gethostbyaddr((void *)&peer.sin_addr.s_addr, sizeof(struct in_addr), AF_INET); |
|---|
| 893 | ], |
|---|
| 894 | AC_MSG_RESULT(yes) |
|---|
| 895 | AC_DEFINE(HAVE_GETHOSTBYADDR, 1, Define if gethostbyaddr function exists), |
|---|
| 896 | AC_MSG_RESULT(no) ) |
|---|
| 897 | |
|---|
| 898 | CFLAGS="$oldcflags" |
|---|
| 899 | |
|---|
| 900 | dnl allow disabling TCP BMI method |
|---|
| 901 | BUILD_BMI_TCP=1 |
|---|
| 902 | AC_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 | ) |
|---|
| 912 | AC_SUBST(BUILD_BMI_TCP) |
|---|
| 913 | |
|---|
| 914 | dnl |
|---|
| 915 | dnl Configure bmi_gm, if --with-gm or a variant given. |
|---|
| 916 | dnl |
|---|
| 917 | AX_GM |
|---|
| 918 | |
|---|
| 919 | dnl |
|---|
| 920 | dnl Configure bmi_mx, if --with-mx or a variant given. |
|---|
| 921 | dnl |
|---|
| 922 | AX_MX |
|---|
| 923 | |
|---|
| 924 | dnl |
|---|
| 925 | dnl Configure bmi_ib, if --with-ib or a variant given. |
|---|
| 926 | dnl |
|---|
| 927 | AX_IB |
|---|
| 928 | |
|---|
| 929 | dnl |
|---|
| 930 | dnl Configure bmi_portals, if --with-portals or a variant given. |
|---|
| 931 | dnl |
|---|
| 932 | AX_PORTALS |
|---|
| 933 | |
|---|
| 934 | dnl |
|---|
| 935 | dnl Configure bmi_zoid, if --with-zoid or a variant given. |
|---|
| 936 | dnl |
|---|
| 937 | AX_ZOID |
|---|
| 938 | |
|---|
| 939 | dnl |
|---|
| 940 | dnl check if fgetxattr takes extra arguments |
|---|
| 941 | AC_MSG_CHECKING([for fgetxattr extra arguments]) |
|---|
| 942 | AC_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 | |
|---|
| 959 | dnl |
|---|
| 960 | dnl look for sysinfo header |
|---|
| 961 | AC_CHECK_HEADER(sys/sysinfo.h, |
|---|
| 962 | AC_DEFINE(HAVE_SYSINFO, 1, Define if sysinfo.h is present) |
|---|
| 963 | ) |
|---|
| 964 | |
|---|
| 965 | dnl for regular functions, add another AC_CHECK_FUNCS line |
|---|
| 966 | AC_CHECK_FUNCS(strnlen) |
|---|
| 967 | AC_CHECK_FUNCS(strtoull) |
|---|
| 968 | AC_CHECK_FUNCS(strstr) |
|---|
| 969 | AC_CHECK_FUNCS(fgetxattr) |
|---|
| 970 | AC_CHECK_FUNCS(fsetxattr) |
|---|
| 971 | |
|---|
| 972 | dnl fgetxattr doesn't have a prototype on some systems |
|---|
| 973 | AC_MSG_CHECKING([for fgetxattr prototype]) |
|---|
| 974 | AC_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 | |
|---|
| 989 | dnl |
|---|
| 990 | dnl check if fgetxattr takes extra arguments: old systems that do not have any |
|---|
| 991 | dnl sort of fgetxattr should fall back to our faked version. |
|---|
| 992 | |
|---|
| 993 | AC_MSG_CHECKING([for fgetxattr extra arguments]) |
|---|
| 994 | AC_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 | |
|---|
| 1015 | AC_MSG_CHECKING([for fsetxattr extra arguments]) |
|---|
| 1016 | AC_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 | |
|---|
| 1034 | dnl check for getmntent(), special test |
|---|
| 1035 | AC_FUNC_GETMNTENT |
|---|
| 1036 | |
|---|
| 1037 | dnl if we use headers that might not be on every platform, add them here |
|---|
| 1038 | AC_CHECK_HEADERS(malloc.h) |
|---|
| 1039 | AC_CHECK_HEADERS(mntent.h) |
|---|
| 1040 | |
|---|
| 1041 | AC_ARG_ENABLE(static-server, |
|---|
| 1042 | [ --enable-static-server Builds the server static], |
|---|
| 1043 | [ staticserver=$enableval ], |
|---|
| 1044 | [ staticserver="no" ] ) |
|---|
| 1045 | |
|---|
| 1046 | if test "$staticserver" = "yes"; then |
|---|
| 1047 | SERVER_LDFLAGS="$LDFLAGS -static" |
|---|
| 1048 | else |
|---|
| 1049 | SERVER_LDFLAGS="$LDFLAGS -rdynamic" |
|---|
| 1050 | fi |
|---|
| 1051 | |
|---|
| 1052 | AC_SUBST(SERVER_LDFLAGS) |
|---|
| 1053 | |
|---|
| 1054 | dnl this is a special case, used to key off options controlling gossip |
|---|
| 1055 | dnl backtrace capability |
|---|
| 1056 | AC_CHECK_HEADERS(execinfo.h, |
|---|
| 1057 | LDFLAGS="$LDFLAGS -rdynamic" |
|---|
| 1058 | GOSSIP_ENABLE_BACKTRACE=1 |
|---|
| 1059 | ) |
|---|
| 1060 | AC_SUBST(GOSSIP_ENABLE_BACKTRACE) |
|---|
| 1061 | |
|---|
| 1062 | dnl -- |
|---|
| 1063 | dnl Check for SDL |
|---|
| 1064 | AC_MSG_CHECKING([for SDL]) |
|---|
| 1065 | SDL_CONFIG=`which sdl-config 2> /dev/null` |
|---|
| 1066 | if ! 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) |
|---|
| 1085 | else |
|---|
| 1086 | AC_MSG_RESULT(no) |
|---|
| 1087 | fi |
|---|
| 1088 | |
|---|
| 1089 | dnl Which form of strerror? |
|---|
| 1090 | AC_MSG_CHECKING([for GNU-style strerror_r]) |
|---|
| 1091 | AC_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 | |
|---|
| 1102 | dnl create any missing subdirectories that wouldn't be created |
|---|
| 1103 | dnl by AC_OUTPUT below (which won't create intermediate dirs). |
|---|
| 1104 | for d in src/apps src/io src/common src/client src/kernel \ |
|---|
| 1105 | doc src/apps/kernel test; do |
|---|
| 1106 | install -d $d; |
|---|
| 1107 | done |
|---|
| 1108 | |
|---|
| 1109 | dnl output final version of top level makefile and subdirectory |
|---|
| 1110 | dnl makefile includes |
|---|
| 1111 | AC_OUTPUT(include/pvfs2.h |
|---|
| 1112 | Makefile |
|---|
| 1113 | module.mk |
|---|
| 1114 | src/apps/admin/module.mk |
|---|
| 1115 | src/apps/admin/pvfs2-config |
|---|
| 1116 | src/apps/devel/module.mk |
|---|
| 1117 | src/apps/karma/module.mk |
|---|
| 1118 | src/apps/vis/module.mk |
|---|
| 1119 | src/apps/fuse/module.mk |
|---|
| 1120 | src/apps/kernel/linux/module.mk |
|---|
| 1121 | src/apps/user/module.mk |
|---|
| 1122 | src/io/trove/module.mk |
|---|
| 1123 | src/io/trove/trove-handle-mgmt/module.mk |
|---|
| 1124 | src/io/trove/trove-dbpf/module.mk |
|---|
| 1125 | src/common/misc/module.mk |
|---|
| 1126 | src/common/quickhash/module.mk |
|---|
| 1127 | src/common/quicklist/module.mk |
|---|
| 1128 | src/common/dotconf/module.mk |
|---|
| 1129 | src/common/id-generator/module.mk |
|---|
| 1130 | src/common/gossip/module.mk |
|---|
| 1131 | src/common/gen-locks/module.mk |
|---|
| 1132 | src/common/llist/module.mk |
|---|
| 1133 | src/common/statecomp/module.mk |
|---|
| 1134 | src/common/events/module.mk |
|---|
| 1135 | src/common/mgmt/module.mk |
|---|
| 1136 | src/io/bmi/module.mk |
|---|
| 1137 | src/io/bmi/bmi_tcp/module.mk |
|---|
| 1138 | src/io/bmi/bmi_gm/module.mk |
|---|
| 1139 | src/io/bmi/bmi_mx/module.mk |
|---|
| 1140 | src/io/bmi/bmi_ib/module.mk |
|---|
| 1141 | src/io/bmi/bmi_portals/module.mk |
|---|
| 1142 | src/io/bmi/bmi_zoid/module.mk |
|---|
| 1143 | src/io/description/module.mk |
|---|
| 1144 | src/io/flow/module.mk |
|---|
| 1145 | src/io/flow/flowproto-bmi-trove/module.mk |
|---|
| 1146 | src/io/flow/flowproto-template/module.mk |
|---|
| 1147 | src/io/flow/flowproto-dump-offsets/module.mk |
|---|
| 1148 | src/io/flow/flowproto-bmi-cache/module.mk |
|---|
| 1149 | src/io/buffer/module.mk |
|---|
| 1150 | src/io/job/module.mk |
|---|
| 1151 | src/io/dev/module.mk |
|---|
| 1152 | src/proto/module.mk |
|---|
| 1153 | src/server/module.mk |
|---|
| 1154 | src/server/request-scheduler/module.mk |
|---|
| 1155 | src/client/sysint/module.mk |
|---|
| 1156 | src/kernel/linux-2.6/Makefile |
|---|
| 1157 | src/kernel/linux-2.4/Makefile |
|---|
| 1158 | doc/module.mk |
|---|
| 1159 | doc/coding/module.mk |
|---|
| 1160 | doc/design/module.mk |
|---|
| 1161 | doc/random/module.mk |
|---|
| 1162 | examples/pvfs2-server.rc |
|---|
| 1163 | doc/doxygen/pvfs2-doxygen.conf |
|---|
| 1164 | ) |
|---|
| 1165 | |
|---|
| 1166 | chmod +x $BUILD_ABSOLUTE_TOP/src/apps/admin/pvfs2-config |
|---|
| 1167 | |
|---|
| 1168 | # print a summary of the configuration information |
|---|
| 1169 | if 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" |
|---|
| 1174 | else |
|---|
| 1175 | AC_MSG_RESULT() |
|---|
| 1176 | AC_MSG_RESULT([***** Displaying PVFS Configuration Information *****]) |
|---|
| 1177 | AC_MSG_RESULT([------------------------------------------------------]) |
|---|
| 1178 | PKGSTR="PVFS2" |
|---|
| 1179 | fi |
|---|
| 1180 | |
|---|
| 1181 | # print PVFS configs (not used by BMI) |
|---|
| 1182 | if test "x$BUILD_BMI_ONLY" != "x1" ; then |
|---|
| 1183 | |
|---|
| 1184 | if test "x$BUILD_KARMA" = "x1" ; then |
|---|
| 1185 | AC_MSG_RESULT([PVFS2 configured to build karma gui : yes]) |
|---|
| 1186 | else |
|---|
| 1187 | AC_MSG_RESULT([PVFS2 configured to build karma gui : no]) |
|---|
| 1188 | fi |
|---|
| 1189 | |
|---|
| 1190 | if test "x$ENABLE_COVERAGE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then |
|---|
| 1191 | AC_MSG_RESULT([PVFS2 configured to perform coverage analysis : yes]) |
|---|
| 1192 | else |
|---|
| 1193 | AC_MSG_RESULT([PVFS2 configured to perform coverage analysis : no]) |
|---|
| 1194 | fi |
|---|
| 1195 | |
|---|
| 1196 | if test "x$MISC_TROVE_FLAGS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then |
|---|
| 1197 | AC_MSG_RESULT([PVFS2 configured for aio threaded callbacks : no]) |
|---|
| 1198 | else |
|---|
| 1199 | AC_MSG_RESULT([PVFS2 configured for aio threaded callbacks : yes]) |
|---|
| 1200 | fi |
|---|
| 1201 | |
|---|
| 1202 | if test "x$BUILD_FUSE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then |
|---|
| 1203 | AC_MSG_RESULT([PVFS2 configured to use FUSE : yes]) |
|---|
| 1204 | else |
|---|
| 1205 | AC_MSG_RESULT([PVFS2 configured to use FUSE : no]) |
|---|
| 1206 | fi |
|---|
| 1207 | |
|---|
| 1208 | if 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]) |
|---|
| 1210 | else |
|---|
| 1211 | AC_MSG_RESULT([PVFS2 configured for the 2.6.x kernel module : yes]) |
|---|
| 1212 | fi |
|---|
| 1213 | |
|---|
| 1214 | if 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]) |
|---|
| 1216 | else |
|---|
| 1217 | AC_MSG_RESULT([PVFS2 configured for the 2.4.x kernel module : yes]) |
|---|
| 1218 | fi |
|---|
| 1219 | |
|---|
| 1220 | if 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]) |
|---|
| 1222 | else |
|---|
| 1223 | AC_MSG_RESULT([PVFS2 configured for using the mmap-ra-cache : yes]) |
|---|
| 1224 | fi |
|---|
| 1225 | |
|---|
| 1226 | if 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]) |
|---|
| 1228 | else |
|---|
| 1229 | AC_MSG_RESULT([PVFS2 will use workaround for redhat 2.4 kernels : yes]) |
|---|
| 1230 | fi |
|---|
| 1231 | |
|---|
| 1232 | if test "x$NPTL_WORKAROUND" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then |
|---|
| 1233 | AC_MSG_RESULT([PVFS2 will use workaround for buggy NPTL : no]) |
|---|
| 1234 | else |
|---|
| 1235 | AC_MSG_RESULT([PVFS2 will use workaround for buggy NPTL : yes]) |
|---|
| 1236 | fi |
|---|
| 1237 | |
|---|
| 1238 | if test "x$BUILD_SERVER" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then |
|---|
| 1239 | AC_MSG_RESULT([PVFS2 server will be built : yes]) |
|---|
| 1240 | else |
|---|
| 1241 | AC_MSG_RESULT([PVFS2 server will be built : no]) |
|---|
| 1242 | |
|---|
| 1243 | fi |
|---|
| 1244 | |
|---|
| 1245 | else |
|---|
| 1246 | |
|---|
| 1247 | # print BMI and PVFS configs |
|---|
| 1248 | if test "x$THREAD_LIB" = "x"; then |
|---|
| 1249 | AC_MSG_RESULT([$PKGSTR configured for a thread-safe client library : no]) |
|---|
| 1250 | else |
|---|
| 1251 | AC_MSG_RESULT([$PKGSTR configured for a thread-safe client library : yes]) |
|---|
| 1252 | fi |
|---|
| 1253 | |
|---|
| 1254 | if test "x$BUILD_EPOLL" = "x1" ; then |
|---|
| 1255 | AC_MSG_RESULT([$PKGSTR configured to use epoll : yes]) |
|---|
| 1256 | else |
|---|
| 1257 | AC_MSG_RESULT([$PKGSTR configured to use epoll : no]) |
|---|
| 1258 | fi |
|---|
| 1259 | |
|---|
| 1260 | if test "x$TRUSTED_CONNECTIONS" = "x" ; then |
|---|
| 1261 | AC_MSG_RESULT([$PKGSTR configured for using trusted connections : no]) |
|---|
| 1262 | else |
|---|
| 1263 | AC_MSG_RESULT([$PKGSTR configured for using trusted connections : yes]) |
|---|
| 1264 | fi |
|---|
| 1265 | |
|---|
| 1266 | fi # end of BMI/PVFS config display |
|---|
| 1267 | |
|---|
| 1268 | if 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.) |
|---|
| 1270 | fi |
|---|
| 1271 | |
|---|
| 1272 | |
|---|
| 1273 | dnl |
|---|
| 1274 | dnl Warn about potential slowness if using a "fast" network along with |
|---|
| 1275 | dnl TCP. Polling with timeout in BMI is implemented by sequentially asking |
|---|
| 1276 | dnl each device to poll for half of the timeout. This leads to a fixed 5 ms |
|---|
| 1277 | dnl delay in the TCP device before the IB device can be queried, for instance. |
|---|
| 1278 | dnl When traffic will only appear on one device, suggest that TCP be disabled. |
|---|
| 1279 | dnl But leave TCP as default on, certainly, as that is what most people want. |
|---|
| 1280 | dnl |
|---|
| 1281 | if 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 |
|---|
| 1290 | fi |
|---|
| 1291 | |
|---|
| 1292 | AC_MSG_RESULT() |
|---|
| 1293 | AC_MSG_RESULT([$PKGSTR version string: $PVFS2_VERSION]) |
|---|
| 1294 | |
|---|
| 1295 | AC_MSG_RESULT() |
|---|