[2162] | 1 | ## Process this file with autoconf to produce configure.
|
---|
| 2 | ## In general, the safest way to proceed is to run the following:
|
---|
| 3 | ##
|
---|
| 4 | ## % aclocal -I `pwd`/../autoconf && autoheader && fgrep -B2 -f src/config.h.include src/google/sparsehash/config.h.in | fgrep -vx -e -- > _sparsehash_config && mv -f _sparsehash_config src/google/sparsehash/config.h.in && autoconf && automake
|
---|
| 5 | ##
|
---|
| 6 | ## NOTE THE GREP! We do a little non-standard thing for this package.
|
---|
| 7 |
|
---|
| 8 | # make sure we're interpreted by some minimal autoconf
|
---|
| 9 | AC_PREREQ(2.57)
|
---|
| 10 |
|
---|
| 11 | AC_INIT(sparsehash, 0.3, opensource@google.com)
|
---|
| 12 | # The argument here is just something that should be in the current directory
|
---|
| 13 | # (for sanity checking)
|
---|
| 14 | AC_CONFIG_SRCDIR(README)
|
---|
| 15 | AM_INIT_AUTOMAKE
|
---|
| 16 | AM_CONFIG_HEADER(src/google/sparsehash/config.h)
|
---|
| 17 |
|
---|
| 18 | # Checks for programs.
|
---|
| 19 | AC_PROG_CC
|
---|
| 20 | AC_PROG_CPP
|
---|
| 21 | AC_PROG_CXX
|
---|
| 22 |
|
---|
| 23 | # Check whether some low-level functions/files are available
|
---|
| 24 | AC_HEADER_STDC
|
---|
| 25 | AC_CHECK_FUNCS(memcpy memmove)
|
---|
| 26 | AC_CHECK_TYPES([u_int16_t]) # defined in most posix systems
|
---|
| 27 | AC_CHECK_TYPES([__uint16]) # defined in some windows systems (vc7)
|
---|
| 28 | # These are 'only' needed for unittests
|
---|
| 29 | AC_CHECK_HEADERS(sys/resource.h unistd.h sys/time.h sys/utsname.h)
|
---|
| 30 |
|
---|
| 31 | # Writes the header files for hash_map, hash_set, and hash_fun into .
|
---|
| 32 | # This also tells us what namespace hash code lives in.
|
---|
| 33 | AC_CXX_MAKE_HASH_MAP_H(src/hash_map.h)
|
---|
| 34 | AC_CXX_MAKE_HASH_FUN_H(src/google/sparsehash/hash_fun.h)
|
---|
| 35 |
|
---|
| 36 | # Find out what namespace 'normal' STL code lives in, and also what namespace
|
---|
| 37 | # the user wants our classes to be defined in
|
---|
| 38 | AC_CXX_STL_NAMESPACE
|
---|
| 39 | AC_DEFINE_GOOGLE_NAMESPACE(google)
|
---|
| 40 |
|
---|
| 41 | # Check what STL features are defined
|
---|
| 42 | AC_CXX_STL_ITERATOR_TAGS
|
---|
| 43 |
|
---|
| 44 | # TODO(csilvers): turn on again once we decide whether we want to enforce
|
---|
| 45 | # DECLARE_POD with the hash types
|
---|
| 46 | #AC_CXX_STL_TYPE_TRAITS
|
---|
| 47 |
|
---|
| 48 | # Write generated configuration file
|
---|
| 49 | AC_CONFIG_FILES([Makefile])
|
---|
| 50 | AC_OUTPUT
|
---|