github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/src/third_party/gflags/configure.ac (about) 1 ## Process this file with autoconf to produce configure. 2 ## In general, the safest way to proceed is to run ./autogen.sh 3 4 # make sure we're interpreted by some minimal autoconf 5 AC_PREREQ(2.57) 6 7 AC_INIT(gflags, 2.0, google-gflags@googlegroups.com) 8 # Update this value for every release! (A:B:C will map to foo.so.(A-C).C.B) 9 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html 10 SO_VERSION=3:0:1 11 12 # The argument here is just something that should be in the current directory 13 # (for sanity checking) 14 AC_CONFIG_SRCDIR(README) 15 AC_CONFIG_MACRO_DIR([m4]) 16 AM_INIT_AUTOMAKE([dist-zip]) 17 AM_CONFIG_HEADER(src/config.h) 18 19 # Checks for programs. 20 AC_PROG_CXX 21 AC_PROG_CC 22 AC_PROG_CPP 23 AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc 24 AC_CANONICAL_HOST 25 26 # MinGW uses autoconf, but also needs the windows shim routines 27 # (since it doesn't have its own support for, say, pthreads). 28 # This requires us to #include a special header file, and also to 29 # link in some windows versions of .o's instead of the unix versions. 30 AH_BOTTOM([ 31 #if defined( __MINGW32__) || defined(__MINGW64__) 32 #include "windows/port.h" 33 #endif 34 ]) 35 # Populate $host_cpu, $host_os, etc. 36 AC_CANONICAL_HOST 37 case $host_os in 38 *mingw*) 39 # Disabling fast install keeps libtool from creating wrapper scripts 40 # around the executables it builds. Such scripts have caused failures on 41 # MinGW. Using this option means an extra link step is executed during 42 # "make install". 43 AC_DISABLE_FAST_INSTALL 44 # /tmp is a mount-point in mingw, and hard to use. use cwd instead 45 TEST_TMPDIR=gflags_testdir 46 ;; 47 *) 48 AC_ENABLE_FAST_INSTALL 49 TEST_TMPDIR=/tmp/gflags 50 ;; 51 esac 52 AC_SUBST(TEST_TMPDIR) 53 54 # Uncomment this if you'll be exporting libraries (.so's) 55 AC_PROG_LIBTOOL 56 AC_SUBST(LIBTOOL_DEPS) 57 AC_SUBST(SO_VERSION) 58 59 # Check whether some low-level functions/files are available 60 AC_HEADER_STDC 61 62 # These are tested for by AC_HEADER_STDC, but I check again to set the var 63 AC_CHECK_HEADER(stdint.h, ac_cv_have_stdint_h=1, ac_cv_have_stdint_h=0) 64 AC_CHECK_HEADER(sys/types.h, ac_cv_have_systypes_h=1, ac_cv_have_systypes_h=0) 65 AC_CHECK_HEADER(inttypes.h, ac_cv_have_inttypes_h=1, ac_cv_have_inttypes_h=0) 66 AC_CHECK_HEADERS([fnmatch.h]) 67 AC_CHECK_HEADERS([sys/stat.h]) 68 AC_CHECK_HEADERS([unistd.h]) 69 70 # These are the types I need. We look for them in either stdint.h, 71 # sys/types.h, or inttypes.h, all of which are part of the default-includes. 72 AC_CHECK_TYPE(uint16_t, ac_cv_have_uint16_t=1, ac_cv_have_uint16_t=0) 73 AC_CHECK_TYPE(u_int16_t, ac_cv_have_u_int16_t=1, ac_cv_have_u_int16_t=0) 74 AC_CHECK_TYPE(__int16, ac_cv_have___int16=1, ac_cv_have___int16=0) 75 76 AC_CHECK_FUNCS([strtoll strtoq]) 77 78 AX_C___ATTRIBUTE__ 79 # We only care about __attribute__ ((unused)) 80 if test x"$ac_cv___attribute__" = x"yes"; then 81 ac_cv___attribute__unused="__attribute__ ((unused))" 82 else 83 ac_cv___attribute__unused= 84 fi 85 86 ACX_PTHREAD 87 88 # Find out what namespace 'normal' STL code lives in, and also what namespace 89 # the user wants our classes to be defined in 90 AC_CXX_STL_NAMESPACE 91 # TODO(csilvers): this should be renamed to gflags. 92 AC_DEFINE_GOOGLE_NAMESPACE(google) 93 94 # Solaris 10 6/06 has a bug where /usr/sfw/lib/libstdc++.la is empty. 95 # If so, we replace it with our own version. 96 LIBSTDCXX_LA_LINKER_FLAG= 97 if test -f /usr/sfw/lib/libstdc++.la && ! test -s /usr/sfw/lib/libstdc++.la 98 then 99 LIBSTDCXX_LA_LINKER_FLAG='-L$(top_srcdir)/src/solaris' 100 fi 101 AC_SUBST(LIBSTDCXX_LA_LINKER_FLAG) 102 103 # These are what's needed by gflags.h.in 104 AC_SUBST(ac_google_start_namespace) 105 AC_SUBST(ac_google_end_namespace) 106 AC_SUBST(ac_google_namespace) 107 AC_SUBST(ac_cv___attribute__unused) 108 AC_SUBST(ac_cv_have_stdint_h) 109 AC_SUBST(ac_cv_have_systypes_h) 110 AC_SUBST(ac_cv_have_inttypes_h) 111 AC_SUBST(ac_cv_have_uint16_t) 112 AC_SUBST(ac_cv_have_u_int16_t) 113 AC_SUBST(ac_cv_have___int16) 114 115 ## Check out ../autoconf/ for other macros you can call to do useful stuff 116 117 # For windows, this has a non-trivial value (__declspec(export)), but any 118 # system that uses configure wants this to be the empty string. 119 AC_DEFINE(GFLAGS_DLL_DECL,, 120 [Always the empty-string on non-windows systems. 121 On windows, should be "__declspec(dllexport)". 122 This way, when we compile the dll, we export our functions/classes. 123 It's safe to define this here because config.h is only used 124 internally, to compile the DLL, and every DLL source file 125 #includes "config.h" before anything else.]) 126 127 # Write generated configuration file, and also .h files 128 AC_CONFIG_FILES([Makefile 129 src/gflags/gflags.h src/gflags/gflags_declare.h 130 src/gflags/gflags_completions.h]) 131 AC_OUTPUT