configure.in 2.51 KB
Newer Older
1
2
3
4
5
6
7
dnl **************************************************************
dnl DARSHAN AUTOCONF SCRIPT
dnl
dnl Process this file with autoconf to produce a configure script.
dnl You may need to use autoheader as well if changing any DEFINEs

dnl sanity checks, output header, location of scripts used here
8
AC_INIT([darshan-util], [2.3.0])
9
10
11
12
13
14
15
16
17
AC_CONFIG_SRCDIR([darshan-logutils.h])
AC_CONFIG_AUX_DIR(../maint/config)
AC_CONFIG_HEADER(darshan-util-config.h)

AC_PROG_INSTALL

CHECK_ZLIB
CHECK_BZLIB

18
19
20
21
22
23
24
25
# checks to see how we can print 64 bit values on this architecture
gt_INTTYPES_PRI
if test x$PRI_MACROS_BROKEN == xyes; then
    AC_MSG_ERROR(PRI_xx macros are broken)
else
    AC_CHECK_HEADERS(inttypes.h, , [AC_MSG_ERROR(Couldn't find inttypes.h)])
fi

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
AC_CHECK_PROG(HAVE_PDFLATEX, pdflatex, yes, no)

if test x$HAVE_PDFLATEX == xyes; then
    AC_MSG_CHECKING(for -halt-on-error argument to pdflatex)
    PDFLATEX_GREP=`pdflatex --help |grep halt-on-error`
    if test "x$PDFLATEX_GREP" != "x"; then
        AC_MSG_RESULT(yes)
        __CP_PDFLATEX_HALT_ON_ERROR="-halt-on-error"
    else
        __CP_PDFLATEX_HALT_ON_ERROR=""
        AC_MSG_RESULT(no)
    fi
fi

dnl Check byte ordering
AC_C_BIGENDIAN

dnl temporarily set large file flags just for this test; we don't want
dnl it to propagate to the makefile because of zlib bugs
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
AC_MSG_CHECKING(for off64_t)
AC_TRY_COMPILE(
    [
    #include <stdio.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <stdarg.h>
    #include <string.h>
    #include <time.h>
    #include <stdlib.h>
    #include <errno.h>
    #include <sys/uio.h>
    #include <pthread.h>
    #include <sys/mman.h>
    #include <search.h>
    #include <assert.h>
    ],
    [ off64_t off; ],
    AC_MSG_RESULT(yes)
    AC_DEFINE(HAVE_OFF64_T, 1, Define if off64_t type is defined),
    AC_MSG_RESULT(no)
)
CFLAGS="$old_cflags"

73
74
75
76
77
78
79
80
DARSHAN_ENABLE_SHARED=0
AC_ARG_ENABLE(shared, 
[  --enable-shared   enables building of shared darshan-util library], 
[if test "x$enableval" = "xyes" ; then
    DARSHAN_ENABLE_SHARED=1
fi]
,)

81
82
AC_CHECK_FUNCS([strndup])

83
84
85
AC_SUBST(__CP_ZLIB_LINK_FLAGS)
AC_SUBST(__CP_ZLIB_INCLUDE_FLAGS)
AC_SUBST(__CP_PDFLATEX_HALT_ON_ERROR)
86
AC_SUBST(DARSHAN_ENABLE_SHARED)
87
88
AC_OUTPUT(Makefile
darshan-job-summary/bin/darshan-job-summary.pl
89
maint/darshan-util.pc
90
91
92
93
94
)

if test x$HAVE_PDFLATEX != xyes; then
    AC_MSG_WARN(Please install pdflatex if you wish to use the darshan-job-summary.pl utility)
fi