File: ax_lib_indi.m4

package info (click to toggle)
hamlib 4.0-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,348 kB
  • sloc: ansic: 182,577; sh: 5,087; cpp: 1,481; perl: 875; makefile: 653; python: 145; awk: 58
file content (23 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
AU_ALIAS([VL_LIB_INDI], [AX_LIB_INDI])
AC_DEFUN([AX_LIB_INDI], [
  AC_CACHE_CHECK([for INDI library],
               ax_cv_lib_indi, [
    AC_LANG_PUSH(C++)
    AC_CHECK_HEADER(libindi/baseclient.h, ax_cv_lib_indi="-lindiclient -lstdc++ -lz")
    AC_LANG_POP()

    if test -z "$ax_cv_lib_indi"; then
      ax_cv_lib_indi="no"
    fi
  ])

  if test "$ax_cv_lib_indi" != "no"; then
    ORIG_LIBS="$LIBS"
    LIBS="$LIBS $ax_cv_lib_indi"
    AC_DEFINE(HAVE_LIBINDI, 1,
              [Define if you have an INDI compatible library])
    LIBS="$ORIG_LIBS"
    INDI_LIBS="$ax_cv_lib_indi"
    AC_SUBST([INDI_LIBS])
  fi
])