Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
804a786c
Commit
804a786c
authored
Sep 29, 2010
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add/fix caching on some configure checks
parent
fe48d947
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
226 additions
and
145 deletions
+226
-145
config/c-compiler.m4
config/c-compiler.m4
+21
-12
config/programs.m4
config/programs.m4
+9
-11
configure
configure
+189
-117
configure.in
configure.in
+7
-5
No files found.
config/c-compiler.m4
View file @
804a786c
...
...
@@ -126,13 +126,18 @@ fi])# PGAC_C_FUNCNAME_SUPPORT
# Given a string, check if the compiler supports the string as a
# command-line option. If it does, add the string to CFLAGS.
AC_DEFUN([PGAC_PROG_CC_CFLAGS_OPT],
[AC_MSG_CHECKING([if $CC supports $1])
pgac_save_CFLAGS=$CFLAGS
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_cflags_$1])])dnl
AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar],
[pgac_save_CFLAGS=$CFLAGS
CFLAGS="$pgac_save_CFLAGS $1"
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
AC_MSG_RESULT(yes),
[CFLAGS="$pgac_save_CFLAGS"
AC_MSG_RESULT(no)])
[Ac_cachevar=yes],
[Ac_cachevar=no])
CFLAGS="$pgac_save_CFLAGS"])
if test x"$Ac_cachevar" = x"yes"; then
CFLAGS="$CFLAGS $1"
fi
undefine([Ac_cachevar])dnl
])# PGAC_PROG_CC_CFLAGS_OPT
...
...
@@ -145,13 +150,17 @@ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
# you can link to a particular function, not just whether you can link.
# In fact, we must actually check that the resulting program runs :-(
AC_DEFUN([PGAC_PROG_CC_LDFLAGS_OPT],
[AC_MSG_CHECKING([if $CC supports $1])
pgac_save_LDFLAGS=$LDFLAGS
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_ldflags_$1])])dnl
AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar],
[pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS $1"
AC_RUN_IFELSE([AC_LANG_PROGRAM([extern void $2 (); void (*fptr) () = $2;],[])],
AC_MSG_RESULT(yes),
[LDFLAGS="$pgac_save_LDFLAGS"
AC_MSG_RESULT(no)],
[LDFLAGS="$pgac_save_LDFLAGS"
AC_MSG_RESULT(assuming no)])
[Ac_cachevar=yes],
[Ac_cachevar=no],
[Ac_cachevar="assuming no"])
LDFLAGS="$pgac_save_LDFLAGS"])
if test x"$Ac_cachevar" = x"yes"; then
LDFLAGS="$LDFLAGS $1"
fi
undefine([Ac_cachevar])dnl
])# PGAC_PROG_CC_LDFLAGS_OPT
config/programs.m4
View file @
804a786c
...
...
@@ -117,7 +117,7 @@ AC_SUBST(FLEXFLAGS)
AC_DEFUN([PGAC_CHECK_READLINE],
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_
VAL(
[pgac_cv_check_readline],
AC_CACHE_
CHECK([for library containing readline],
[pgac_cv_check_readline],
[pgac_cv_check_readline=no
pgac_save_LIBS=$LIBS
if test x"$with_libedit_preferred" != x"yes"
...
...
@@ -125,7 +125,6 @@ then READLINE_ORDER="-lreadline -ledit"
else READLINE_ORDER="-ledit -lreadline"
fi
for pgac_rllib in $READLINE_ORDER ; do
AC_MSG_CHECKING([for ${pgac_rllib}])
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
AC_TRY_LINK_FUNC([readline], [[
...
...
@@ -144,14 +143,11 @@ for pgac_rllib in $READLINE_ORDER ; do
]])
done
if test "$pgac_cv_check_readline" != no ; then
AC_MSG_RESULT([yes ($pgac_cv_check_readline)])
break
else
AC_MSG_RESULT(no)
fi
done
LIBS=$pgac_save_LIBS
])[]dnl AC_CACHE_
VAL
])[]dnl AC_CACHE_
CHECK
if test "$pgac_cv_check_readline" != no ; then
LIBS="$pgac_cv_check_readline $LIBS"
...
...
@@ -167,8 +163,8 @@ fi
# Readline versions < 2.1 don't have rl_completion_append_character
AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER],
[AC_
MSG_CHECKING([for rl_completion_append_character])
AC_TRY_LINK([#include <stdio.h>
[AC_
CACHE_CHECK([for rl_completion_append_character], pgac_cv_var_rl_completion_append_character,
[
AC_TRY_LINK([#include <stdio.h>
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
...
...
@@ -176,10 +172,12 @@ AC_TRY_LINK([#include <stdio.h>
#endif
],
[rl_completion_append_character = 'x';],
[AC_MSG_RESULT(yes)
[pgac_cv_var_rl_completion_append_character=yes],
[pgac_cv_var_rl_completion_append_character=no])])
if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
[Define to 1 if you have the global variable 'rl_completion_append_character'.])
],
[AC_MSG_RESULT(no)])
])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
[Define to 1 if you have the global variable 'rl_completion_append_character'.])
fi
])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
...
...
configure
View file @
804a786c
This diff is collapsed.
Click to expand it.
configure.in
View file @
804a786c
...
...
@@ -1355,12 +1355,14 @@ fi
dnl Cannot use AC_CHECK_FUNC because sigsetjmp may be a macro
dnl (especially on GNU libc)
dnl See also comments in c.h.
AC_
MSG_CHECKING(for sigsetjmp)
AC_TRY_LINK([#include <setjmp.h>],
AC_
CACHE_CHECK([for sigsetjmp], pgac_cv_func_sigsetjmp,
[
AC_TRY_LINK([#include <setjmp.h>],
[sigjmp_buf x; sigsetjmp(x, 1);],
[AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have sigsetjmp().])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
[pgac_cv_func_sigsetjmp=yes],
[pgac_cv_func_sigsetjmp=no])])
if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have sigsetjmp().])
fi
AC_DECL_SYS_SIGLIST
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment