File: ac_so_preference.m4

package info (click to toggle)
mailsync 5.2.2-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 776 kB
  • sloc: cpp: 2,103; ansic: 107; makefile: 88; sh: 9
file content (21 lines) | stat: -rw-r--r-- 608 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dnl AC_SO_PREFERENCE([DEFAULT[,ACTION-IF-SO-PREFERRED[,ACTION-IF-STATIC-PREFERRED]]])
dnl Output:
dnl Environment: PREFER_SO=yes
dnl AM_CONDITIONAL: PREFER_SO
AC_DEFUN(AC_SO_PREFERENCE,[
 PREFER_SO="$1"
 AC_ARG_WITH(so-preference,
  AC_HELP_STRING([--with-so-preference],[prefer dynamic linking over static (default $1)]),
  [
   PREFER_SO="$withval"
  ]
 )
 if test "${PREFER_SO}" = "shared" -o "${PREFER_SO}" = "so" -o "${PREFER_SO}" = "yes" ; then
  PREFER_SO="yes"
  ifelse([$2], , :, [$2])
 else
  PREFER_SO="no"
  ifelse([$3], , :, [$3])
 fi
 AM_CONDITIONAL(PREFER_SO,[test "${PREFER_SO}" = "yes"])
])