File: hdrl.m4

package info (click to toggle)
cpl-plugin-vimos 4.1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 28,228 kB
  • sloc: ansic: 169,271; cpp: 16,177; sh: 4,344; python: 3,678; makefile: 1,138; perl: 10
file content (34 lines) | stat: -rw-r--r-- 1,288 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# HDRL_CHECK([location])
# ----------------------
# Sets build variables required to build and link hdrl
# the argument defines the relative location of the hdrl external in the source
# tree
# Note that this macro calls GSL_CHECK_LIBS([optional]) so additional calls to
# this macro with optional argument can be skipped in the pipeline.
AC_DEFUN([HDRL_CHECK],
[
    HDRL_LOCATION="$1"

    # check for optional GSL, needed in pipelines to correctly setup
    # HDRL_LDFLAGS and HDRL_LIBS and in the case of no GSL being present to not
    # declare functions using GSL in the hdrl headers as this requires a
    # HAVE_GSL defined in the pipelines config.h
    GSL_CHECK_LIBS([optional])

    AC_MSG_CHECKING([HDRL in $HDRL_LOCATION])

    # requires cpl and libm as it is a static library
    HDRL_LIBS="-lhdrl -lcplcore -lcpldrs -lcplui -lcpldfs -lcext -lm $GSL_LIBS"
    # la file to be added to DEPENDENCIES libtool doesn't track static libs
    LIBHDRL="\$(top_builddir)/$HDRL_LOCATION/libhdrl.la"
    HDRL_LDFLAGS="-L\$(top_builddir)/$HDRL_LOCATION $GSL_LDFLAGS"
    HDRL_INCLUDES="-I\$(top_srcdir)/$HDRL_LOCATION"

    AC_SUBST(HDRL_LIBS)
    AC_SUBST(LIBHDRL)
    AC_SUBST(HDRL_LDFLAGS)
    AC_SUBST(HDRL_INTERNAL_CFLAGS)
    AC_SUBST(HDRL_INCLUDES)

    AC_MSG_RESULT([ok])
])