@@ -779,6 +779,9 @@ enable_coverage
779779GENHTML
780780LCOV
781781GCOV
782+ enable_coccicheck
783+ SPFLAGS
784+ SPATCH
782785enable_debug
783786enable_rpath
784787default_port
@@ -846,6 +849,7 @@ with_pgport
846849enable_rpath
847850enable_debug
848851enable_profiling
852+ enable_coccicheck
849853enable_coverage
850854enable_dtrace
851855enable_tap_tests
@@ -1547,6 +1551,7 @@ Optional Features:
15471551 executables
15481552 --enable-debug build with debugging symbols (-g)
15491553 --enable-profiling build with profiling enabled
1554+ --enable-coccicheck enable Coccinelle checks (requires spatch)
15501555 --enable-coverage build with coverage testing instrumentation
15511556 --enable-dtrace build with DTrace support
15521557 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
@@ -3347,6 +3352,91 @@ fi
33473352
33483353
33493354
3355+ #
3356+ # --enable-coccicheck enables Coccinelle check target "coccicheck"
3357+ #
3358+
3359+
3360+ # Check whether --enable-coccicheck was given.
3361+ if test "${enable_coccicheck+set}" = set; then :
3362+ enableval=$enable_coccicheck;
3363+ case $enableval in
3364+ yes)
3365+ if test -z "$SPATCH"; then
3366+ for ac_prog in spatch
3367+ do
3368+ # Extract the first word of "$ac_prog", so it can be a program name with args.
3369+ set dummy $ac_prog; ac_word=$2
3370+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3371+ $as_echo_n "checking for $ac_word... " >&6; }
3372+ if ${ac_cv_path_SPATCH+:} false; then :
3373+ $as_echo_n "(cached) " >&6
3374+ else
3375+ case $SPATCH in
3376+ [\\/]* | ?:[\\/]*)
3377+ ac_cv_path_SPATCH="$SPATCH" # Let the user override the test with a path.
3378+ ;;
3379+ *)
3380+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381+ for as_dir in $PATH
3382+ do
3383+ IFS=$as_save_IFS
3384+ test -z "$as_dir" && as_dir=.
3385+ for ac_exec_ext in '' $ac_executable_extensions; do
3386+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3387+ ac_cv_path_SPATCH="$as_dir/$ac_word$ac_exec_ext"
3388+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3389+ break 2
3390+ fi
3391+ done
3392+ done
3393+ IFS=$as_save_IFS
3394+
3395+ ;;
3396+ esac
3397+ fi
3398+ SPATCH=$ac_cv_path_SPATCH
3399+ if test -n "$SPATCH"; then
3400+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPATCH" >&5
3401+ $as_echo "$SPATCH" >&6; }
3402+ else
3403+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3404+ $as_echo "no" >&6; }
3405+ fi
3406+
3407+
3408+ test -n "$SPATCH" && break
3409+ done
3410+
3411+ else
3412+ # Report the value of SPATCH in configure's output in all cases.
3413+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SPATCH" >&5
3414+ $as_echo_n "checking for SPATCH... " >&6; }
3415+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPATCH" >&5
3416+ $as_echo "$SPATCH" >&6; }
3417+ fi
3418+
3419+ if test -z "$SPATCH"; then
3420+ as_fn_error $? "spatch not found" "$LINENO" 5
3421+ fi
3422+
3423+ ;;
3424+ no)
3425+ :
3426+ ;;
3427+ *)
3428+ as_fn_error $? "no argument expected for --enable-coccicheck option" "$LINENO" 5
3429+ ;;
3430+ esac
3431+
3432+ else
3433+ enable_coccicheck=no
3434+
3435+ fi
3436+
3437+
3438+
3439+
33503440#
33513441# --enable-coverage enables generation of code coverage metrics with gcov
33523442#
@@ -15173,7 +15263,7 @@ else
1517315263 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1517415264 since some C++ compilers masquerading as C compilers
1517515265 incorrectly reject 9223372036854775807. */
15176- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62 ))
15266+ #define LARGE_OFF_T (((( off_t) 1 << 31) << 31) - 1 + ((( off_t) 1 << 31) << 31 ))
1517715267 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1517815268 && LARGE_OFF_T % 2147483647 == 1)
1517915269 ? 1 : -1];
@@ -15219,7 +15309,7 @@ else
1521915309 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1522015310 since some C++ compilers masquerading as C compilers
1522115311 incorrectly reject 9223372036854775807. */
15222- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62 ))
15312+ #define LARGE_OFF_T (((( off_t) 1 << 31) << 31) - 1 + ((( off_t) 1 << 31) << 31 ))
1522315313 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1522415314 && LARGE_OFF_T % 2147483647 == 1)
1522515315 ? 1 : -1];
@@ -15243,7 +15333,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1524315333 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1524415334 since some C++ compilers masquerading as C compilers
1524515335 incorrectly reject 9223372036854775807. */
15246- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62 ))
15336+ #define LARGE_OFF_T (((( off_t) 1 << 31) << 31) - 1 + ((( off_t) 1 << 31) << 31 ))
1524715337 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1524815338 && LARGE_OFF_T % 2147483647 == 1)
1524915339 ? 1 : -1];
@@ -15288,7 +15378,7 @@ else
1528815378 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1528915379 since some C++ compilers masquerading as C compilers
1529015380 incorrectly reject 9223372036854775807. */
15291- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62 ))
15381+ #define LARGE_OFF_T (((( off_t) 1 << 31) << 31) - 1 + ((( off_t) 1 << 31) << 31 ))
1529215382 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1529315383 && LARGE_OFF_T % 2147483647 == 1)
1529415384 ? 1 : -1];
@@ -15312,7 +15402,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1531215402 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1531315403 since some C++ compilers masquerading as C compilers
1531415404 incorrectly reject 9223372036854775807. */
15315- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62 ))
15405+ #define LARGE_OFF_T (((( off_t) 1 << 31) << 31) - 1 + ((( off_t) 1 << 31) << 31 ))
1531615406 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1531715407 && LARGE_OFF_T % 2147483647 == 1)
1531815408 ? 1 : -1];
0 commit comments