"Fossies" - the Fresh Open Source Software Archive

Member "hitch-1.5.2/hitch.m4" (26 Nov 2019, 1032 Bytes) of package /linux/www/hitch-1.5.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "hitch.m4": 1.5.0_vs_1.5.1.

    1 # HITCH_SEARCH_LIBS(VAR, LIBS, FUNC, NOTFOUND)
    2 # --------------------------------------------
    3 AC_DEFUN([HITCH_SEARCH_LIBS], [
    4 	hitch_save_LIBS=$LIBS
    5 	LIBS=""
    6 	AC_SEARCH_LIBS([$3], [$2], [], [$4])
    7 	AC_SUBST([$1_LIBS], [$LIBS])
    8 	LIBS=$hitch_save_LIBS
    9 ])
   10 
   11 # HITCH_CHECK_FUNC(FUNC, LIBS, FOUND, NOTFOUND)
   12 # --------------------------------------------
   13 AC_DEFUN([HITCH_CHECK_FUNC], [
   14 	hitch_save_LIBS=$LIBS
   15 	LIBS="$2"
   16 	AC_CHECK_FUNC([$1], [$3], [$4])
   17 	LIBS=$hitch_save_LIBS
   18 ])
   19 
   20 # _HITCH_CHECK_FLAG(VAR, FLAG)
   21 ------------------------------
   22 AC_DEFUN([_HITCH_CHECK_FLAG], [
   23 
   24 	AC_MSG_CHECKING([whether the compiler accepts $2])
   25 	hitch_save_CFLAGS=$CFLAGS
   26 	CFLAGS="[$]$1 $2 $CFLAGS"
   27 	AC_RUN_IFELSE(
   28 		[AC_LANG_SOURCE([int main(void) { return (0); }])],
   29 		[AC_MSG_RESULT([yes]); $1="[$]$1 $2"],
   30 		[AC_MSG_RESULT([no])])
   31 	CFLAGS=$hitch_save_CFLAGS
   32 ])
   33 
   34 # HITCH_CHECK_FLAGS(VAR, FLAGS)
   35 -------------------------------
   36 AC_DEFUN([HITCH_CHECK_FLAGS], [
   37 
   38 	m4_foreach([_flag],
   39 		m4_split(m4_normalize([$2])),
   40 			[_HITCH_CHECK_FLAG([$1], _flag)])
   41 
   42 ])