|
Revision 180, 1.2 KB
(checked in by holtmann, 3 years ago)
|
|
Create files for new configuration framework
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | AC_DEFUN([AM_PATH_OPENOBEX], [ |
|---|
| 2 | if (test "${prefix}" = "NONE"); then |
|---|
| 3 | openobex_prefix=${ac_default_prefix} |
|---|
| 4 | else |
|---|
| 5 | openobex_prefix=${prefix} |
|---|
| 6 | fi |
|---|
| 7 | |
|---|
| 8 | AC_ARG_WITH(openobex, AC_HELP_STRING([--with-openobex=DIR], [OpenOBEX library is installed in DIR]), [ |
|---|
| 9 | if (test "${withval}" != "yes"); then |
|---|
| 10 | openobex_prefix=${withval} |
|---|
| 11 | fi |
|---|
| 12 | ]) |
|---|
| 13 | |
|---|
| 14 | ac_save_CPPFLAGS=$CPPFLAGS |
|---|
| 15 | ac_save_LDFLAGS=$LDFLAGS |
|---|
| 16 | |
|---|
| 17 | OPENOBEX_CFLAGS="" |
|---|
| 18 | test -d "${openobex_prefix}/include" && OPENOBEX_CFLAGS="$OPENOBEX_CFLAGS -I${openobex_prefix}/include" |
|---|
| 19 | |
|---|
| 20 | CPPFLAGS="$CPPFLAGS $OPENOBEX_CFLAGS" |
|---|
| 21 | AC_CHECK_HEADER(openobex/obex.h,, AC_MSG_ERROR(OpenOBEX header files not found)) |
|---|
| 22 | |
|---|
| 23 | OPENOBEX_LIBS="" |
|---|
| 24 | if (test "${ac_default_prefix}" = "${openobex_prefix}"); then |
|---|
| 25 | test -d "${libdir}" && OPENOBEX_LIBS="$OPENOBEX_LIBS -L${libdir}" |
|---|
| 26 | else |
|---|
| 27 | test -d "${openobex_prefix}/lib64" && OPENOBEX_LIBS="$OPENOBEX_LIBS -L${openobex_prefix}/lib64" |
|---|
| 28 | test -d "${openobex_prefix}/lib" && OPENOBEX_LIBS="$OPENOBEX_LIBS -L${openobex_prefix}/lib" |
|---|
| 29 | fi |
|---|
| 30 | |
|---|
| 31 | LDFLAGS="$LDFLAGS $OPENOBEX_LIBS" |
|---|
| 32 | AC_CHECK_LIB(openobex, OBEX_Init, OPENOBEX_LIBS="$OPENOBEX_LIBS -lopenobex", AC_MSG_ERROR(OpenOBEX library not found)) |
|---|
| 33 | |
|---|
| 34 | CPPFLAGS=$ac_save_CPPFLAGS |
|---|
| 35 | LDFLAGS=$ac_save_LDFLAGS |
|---|
| 36 | |
|---|
| 37 | AC_SUBST(OPENOBEX_CFLAGS) |
|---|
| 38 | AC_SUBST(OPENOBEX_LIBS) |
|---|
| 39 | ]) |
|---|