@@ -314,7 +314,7 @@ ac_includes_default="\
314
314
# include <unistd.h>
315
315
#endif"
316
316
317
- ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
317
+ ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318
318
ac_subst_files=''
319
319
320
320
# Initialize some variables set by options.
@@ -865,6 +865,7 @@ Optional Features:
865
865
--disable-rpath do not embed shared library search path in executables
866
866
--disable-spinlocks do not use spinlocks
867
867
--enable-debug build with debugging symbols (-g)
868
+ --enable-profiling build with profiling enabled
868
869
--enable-dtrace build with DTrace support
869
870
--enable-depend turn on automatic dependency tracking
870
871
--enable-cassert enable assertion checks (for debugging)
@@ -1948,6 +1949,37 @@ fi;
1948
1949
1949
1950
1950
1951
1952
+ #
1953
+ # --enable-profiling enables gcc profiling
1954
+ #
1955
+
1956
+ pgac_args="$pgac_args enable_profiling"
1957
+
1958
+ # Check whether --enable-profiling or --disable-profiling was given.
1959
+ if test "${enable_profiling+set}" = set; then
1960
+ enableval="$enable_profiling"
1961
+
1962
+ case $enableval in
1963
+ yes)
1964
+ :
1965
+ ;;
1966
+ no)
1967
+ :
1968
+ ;;
1969
+ *)
1970
+ { { echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
1971
+ echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
1972
+ { (exit 1); exit 1; }; }
1973
+ ;;
1974
+ esac
1975
+
1976
+ else
1977
+ enable_profiling=no
1978
+
1979
+ fi;
1980
+
1981
+
1982
+
1951
1983
#
1952
1984
# DTrace
1953
1985
#
@@ -3149,6 +3181,22 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3149
3181
CFLAGS="$CFLAGS -g"
3150
3182
fi
3151
3183
3184
+ # enable profiling if --enable-profiling
3185
+ if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
3186
+ if test "$GCC" = yes; then
3187
+
3188
+ cat >>confdefs.h <<\_ACEOF
3189
+ #define PROFILE_PID_DIR 1
3190
+ _ACEOF
3191
+
3192
+ CFLAGS="$CFLAGS -pg"
3193
+ else
3194
+ { { echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
3195
+ echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
3196
+ { (exit 1); exit 1; }; }
3197
+ fi
3198
+ fi
3199
+
3152
3200
{ echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3153
3201
echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3154
3202
@@ -23975,6 +24023,7 @@ s,@default_port@,$default_port,;t t
23975
24023
s,@enable_shared@,$enable_shared,;t t
23976
24024
s,@enable_rpath@,$enable_rpath,;t t
23977
24025
s,@enable_debug@,$enable_debug,;t t
24026
+ s,@enable_profiling@,$enable_profiling,;t t
23978
24027
s,@DTRACE@,$DTRACE,;t t
23979
24028
s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23980
24029
s,@enable_dtrace@,$enable_dtrace,;t t
0 commit comments