PostgreSQL数据库源码安装第一步——configure脚本分析(初始化)

  下面的代码是用来初始化输出到Makefile中变量,比如ac_default_prefix、ac_clean_files、ac_cnofig_libobj_dir等。

 1 # Initializations.
 2 ac_default_prefix=/usr/local
 3 ac_clean_files=
 4 ac_config_libobj_dir=.
 5 LIBOBJS=
 6 cross_compiling=no
 7 subdirs=
 8 MFLAGS=
 9 MAKEFLAGS=
10 SHELL=${CONFIG_SHELL-/bin/sh}
11 # Identity of this package.
12 PACKAGE_NAME='PostgreSQL'
13 PACKAGE_TARNAME='postgresql'
14 PACKAGE_VERSION='8.4.1'
15 PACKAGE_STRING='PostgreSQL 8.4.1'
16 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
17 ac_unique_file="src/backend/access/common/heaptuple.c"
18 ac_default_prefix=/usr/local/pgsql

变量

  1 ac_subst_vars='SHELL
  2 PATH_SEPARATOR
  3 PACKAGE_NAME
  4 PACKAGE_TARNAME
  5 PACKAGE_VERSION
  6 PACKAGE_STRING
  7 PACKAGE_BUGREPORT
  8 exec_prefix
  9 prefix
 10 program_transform_name
 11 bindir
 12 sbindir
 13 libexecdir
 14 datarootdir
 15 datadir
 16 sysconfdir
 17 sharedstatedir
 18 localstatedir
 19 includedir
 20 oldincludedir
 21 docdir
 22 infodir
 23 htmldir
 24 dvidir
 25 pdfdir
 26 psdir
 27 libdir
 28 localedir
 29 mandir
 30 DEFS
 31 ECHO_C
 32 ECHO_N
 33 ECHO_T
 34 LIBS
 35 build_alias
 36 host_alias
 37 target_alias
 38 configure_args
 39 PG_MAJORVERSION
 40 build
 41 build_cpu
 42 build_vendor
 43 build_os
 44 host
 45 host_cpu
 46 host_vendor
 47 host_os
 48 PORTNAME
 49 enable_nls
 50 WANTED_LANGUAGES
 51 default_port
 52 enable_shared
 53 enable_rpath
 54 enable_debug
 55 enable_profiling
 56 GCOV
 57 LCOV
 58 GENHTML
 59 enable_coverage
 60 DTRACE
 61 DTRACEFLAGS
 62 enable_dtrace
 63 CC
 64 CFLAGS
 65 LDFLAGS
 66 CPPFLAGS
 67 ac_ct_CC
 68 EXEEXT
 69 OBJEXT
 70 SUN_STUDIO_CC
 71 CPP
 72 GCC
 73 TAS
 74 autodepend
 75 INCLUDES
 76 enable_thread_safety
 77 with_tcl
 78 with_perl
 79 with_python
 80 with_gssapi
 81 with_krb5
 82 krb_srvtab
 83 with_pam
 84 with_ldap
 85 with_bonjour
 86 with_openssl
 87 with_ossp_uuid
 88 XML2_CONFIG
 89 with_libxml
 90 with_libxslt
 91 with_system_tzdata
 92 with_zlib
 93 GREP
 94 EGREP
 95 ELF_SYS
 96 LDFLAGS_SL
 97 LD
 98 with_gnu_ld
 99 ld_R_works
100 RANLIB
101 STRIP
102 STRIP_STATIC_LIB
103 STRIP_SHARED_LIB
104 AR
105 DLLTOOL
106 DLLWRAP
107 WINDRES
108 TAR
109 LN_S
110 AWK
111 BISON
112 BISONFLAGS
113 FLEX
114 FLEXFLAGS
115 PERL
116 perl_archlibexp
117 perl_privlibexp
118 perl_useshrplib
119 perl_embed_ldflags
120 PYTHON
121 python_version
122 python_configdir
123 python_includespec
124 python_libdir
125 python_libspec
126 python_additional_libs
127 ZIC
128 OSSP_UUID_LIBS
129 HAVE_IPV6
130 LIBOBJS
131 acx_pthread_config
132 PTHREAD_CC
133 PTHREAD_LIBS
134 PTHREAD_CFLAGS
135 LDAP_LIBS_FE
136 LDAP_LIBS_BE
137 HAVE_POSIX_SIGNALS
138 MSGFMT
139 MSGMERGE
140 XGETTEXT
141 TCLSH
142 TCL_CONFIG_SH
143 TCL_INCLUDE_SPEC
144 TCL_LIB_FILE
145 TCL_LIBS
146 TCL_LIB_SPEC
147 TCL_SHARED_BUILD
148 TCL_SHLIB_LD_LIBS
149 NSGMLS
150 JADE
151 have_docbook
152 DOCBOOKSTYLE
153 COLLATEINDEX
154 SGMLSPL
155 DOCBOOK2MAN
156 vpath_build
157 LTLIBOBJS'
158 
159 ac_subst_files=''
160 
161 ac_precious_vars='build_alias
162 host_alias
163 target_alias
164 CC
165 CFLAGS
166 LDFLAGS
167 LIBS
168 CPPFLAGS
169 CPP
170 LDFLAGS_SL
171 DOCBOOKSTYLE'

为大多数测试编译器的用例输出默认头文件

 1 # Factoring default headers for most tests.
 2 ac_includes_default="\
 3 #include <stdio.h>
 4 #ifdef HAVE_SYS_TYPES_H
 5 # include <sys/types.h>
 6 #endif
 7 #ifdef HAVE_SYS_STAT_H
 8 # include <sys/stat.h>
 9 #endif
10 #ifdef STDC_HEADERS
11 # include <stdlib.h>
12 # include <stddef.h>
13 #else
14 # ifdef HAVE_STDLIB_H
15 #  include <stdlib.h>
16 # endif
17 #endif
18 #ifdef HAVE_STRING_H
19 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
20 #  include <memory.h>
21 # endif
22 # include <string.h>
23 #endif
24 #ifdef HAVE_STRINGS_H
25 # include <strings.h>
26 #endif
27 #ifdef HAVE_INTTYPES_H
28 # include <inttypes.h>
29 #endif
30 #ifdef HAVE_STDINT_H
31 # include <stdint.h>
32 #endif
33 #ifdef HAVE_UNISTD_H
34 # include <unistd.h>
35 #endif"

初始化由options设置的一些变量

 1 # Initialize some variables set by options.
 2 ac_init_help=
 3 ac_init_version=false
 4 # The variables have the same names as the options, with
 5 # dashes changed to underlines.
 6 cache_file=/dev/null
 7 exec_prefix=NONE
 8 no_create=
 9 no_recursion=
10 prefix=NONE
11 program_prefix=NONE
12 program_suffix=NONE
13 program_transform_name=s,x,x,
14 silent=
15 site=
16 srcdir=
17 verbose=
18 x_includes=NONE
19 x_libraries=NONE

初始化目录选项

 1 # Installation directory options.
 2 # These are left unexpanded so users can "make install exec_prefix=/foo"
 3 # and all the variables that are supposed to be based on exec_prefix
 4 # by default will actually change.
 5 # Use braces instead of parens because sh, perl, etc. also accept them.
 6 # (The list follows the same order as the GNU Coding Standards.)
 7 bindir='${exec_prefix}/bin'
 8 sbindir='${exec_prefix}/sbin'
 9 libexecdir='${exec_prefix}/libexec'
10 datarootdir='${prefix}/share'
11 datadir='${datarootdir}'
12 sysconfdir='${prefix}/etc'
13 sharedstatedir='${prefix}/com'
14 localstatedir='${prefix}/var'
15 includedir='${prefix}/include'
16 oldincludedir='/usr/include'
17 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
18 infodir='${datarootdir}/info'
19 htmldir='${docdir}'
20 dvidir='${docdir}'
21 pdfdir='${docdir}'
22 psdir='${docdir}'
23 libdir='${exec_prefix}/lib'
24 localedir='${datarootdir}/locale'
25 mandir='${datarootdir}/man'

 

posted @ 2020-11-02 13:00  肥叔菌  阅读(451)  评论(0)    收藏  举报