@@ -314,7 +314,7 @@ ac_includes_default="\
314314# include <unistd.h>
315315#endif"
316316
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'
318318ac_subst_files=''
319319
320320# Initialize some variables set by options.
@@ -865,6 +865,7 @@ Optional Features:
865865 --disable-rpath do not embed shared library search path in executables
866866 --disable-spinlocks do not use spinlocks
867867 --enable-debug build with debugging symbols (-g)
868+ --enable-profiling build with profiling enabled
868869 --enable-dtrace build with DTrace support
869870 --enable-depend turn on automatic dependency tracking
870871 --enable-cassert enable assertion checks (for debugging)
@@ -1948,6 +1949,37 @@ fi;
19481949
19491950
19501951
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+
19511983#
19521984# DTrace
19531985#
@@ -3149,6 +3181,22 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
31493181 CFLAGS="$CFLAGS -g"
31503182fi
31513183
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+
31523200{ echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
31533201echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
31543202
@@ -23975,6 +24023,7 @@ s,@default_port@,$default_port,;t t
2397524023s,@enable_shared@,$enable_shared,;t t
2397624024s,@enable_rpath@,$enable_rpath,;t t
2397724025s,@enable_debug@,$enable_debug,;t t
24026+ s,@enable_profiling@,$enable_profiling,;t t
2397824027s,@DTRACE@,$DTRACE,;t t
2397924028s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
2398024029s,@enable_dtrace@,$enable_dtrace,;t t