blob: 7ea0c22727ebd504824bd8680fc92fb7ef24f627 [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001## Process this file with autoconf to produce configure.
2## In general, the safest way to proceed is to run ./autogen.sh
3
4AC_PREREQ(2.59)
5
6# Note: If you change the version, you must also update it in:
7# * java/pom.xml
8# * python/setup.py
9# * src/google/protobuf/stubs/common.h
kenton@google.coma001ed02008-12-01 23:47:49 +000010# * src/Makefile.am (Update -version-info for LDFLAGS if needed)
kenton@google.com7b29a262008-10-16 22:56:18 +000011AC_INIT([protobuf],[2.0.3-SNAPSHOT],[protobuf@googlegroups.com])
temporal40ee5512008-07-10 02:12:20 +000012
13AC_CONFIG_SRCDIR(src/google/protobuf/message.cc)
kenton@google.comc76caac2008-09-30 22:11:21 +000014AC_CONFIG_HEADERS([config.h])
kenton@google.com25bc5cd2008-12-04 20:34:50 +000015AC_CONFIG_MACRO_DIR([m4])
temporal40ee5512008-07-10 02:12:20 +000016AM_INIT_AUTOMAKE
17
18# Checks for programs.
19AC_PROG_CC
20AC_PROG_CXX
kenton@google.com25bc5cd2008-12-04 20:34:50 +000021ACX_USE_SYSTEM_EXTENSIONS
temporal40ee5512008-07-10 02:12:20 +000022AC_PROG_LIBTOOL
23AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
kenton@google.com25bc5cd2008-12-04 20:34:50 +000024AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
25
26AS_IF([test "$SUNCC" = "yes"],[
27 CFLAGS="$CFLAGS -xO4 -xlibmil -xdepend -Xa -mt -xstrconst -D_FORTEC_"
28 CXXFLAGS="$CXXFLAGS -xO4 -xlibmil -mt -D_FORTEC_ -xlang=c99 -compat=5 -library=stlport4 -template=no%extdef"
29])
30
temporal40ee5512008-07-10 02:12:20 +000031
32# Checks for header files.
33AC_HEADER_STDC
34AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h])
35
36# Checks for library functions.
37AC_FUNC_MEMCMP
38AC_FUNC_STRTOD
39AC_CHECK_FUNCS([ftruncate memset mkdir strchr strerror strtol])
40
41ACX_PTHREAD
42AC_CXX_STL_HASH
43
kenton@google.comc76caac2008-09-30 22:11:21 +000044AC_CONFIG_FILES([Makefile src/Makefile ])
45AC_OUTPUT