File: acinclude.m4

package info (click to toggle)
jclassinfo 0.19.1-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,176 kB
  • sloc: sh: 8,551; ansic: 6,672; makefile: 199; xml: 93
file content (21 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
AC_PREREQ(2.57)

AC_DEFUN([ANA_CHECK_GETOPT], [
	AC_SUBST(GETOPT_INCLUDES)
	AC_SUBST(GETOPT_LIB)
	AC_SUBST(GETOPT_OBJS)
dnl Check if the header file exists	
	AC_CHECK_HEADER([getopt.h], , [GETOPT_INCLUDES="-I../getopt"],[])
dnl Find the library it is in
	AC_CHECK_FUNC(getopt_long_only,[],
	[
      AC_CHECK_LIB([gnugetopt],[getopt_long_only],[GETOPT_LIB="-lgnugetopt"],
      [
        AC_CHECK_LIB([iberty],[getopt_long_only],[GETOPT_LIB="-liberty"],
	    [
	  	  AC_LINK_FILES(getopt/getopt.c getopt/getopt1.c, jclassinfo/getopt.c jclassinfo/getopt1.c)
          GETOPT_OBJS="getopt.$OBJEXT getopt1.$OBJEXT"
	    ]) 
      ])
	])
])