Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 117 lines (106 sloc) 3.958 kb
83aa758 this pretty much finishes the automake work for ogg
jack authored
1 # Configure paths for libogg
2 # Jack Moffitt <jack@icecast.org> 10-21-2000
3 # Shamelessly stolen from Owen Taylor and Manish Singh
4
5821957 Use XIPH_ as our autoconf macro prefix, rather than borrowing the AM_ na...
giles authored
5 dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
83aa758 this pretty much finishes the automake work for ogg
jack authored
6 dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
7 dnl
5eee6bd Quote our macro name in AC_DEFUN() to avoid a warning in automake 1.8. P...
giles authored
8 AC_DEFUN([XIPH_PATH_OGG],
83aa758 this pretty much finishes the automake work for ogg
jack authored
9 [dnl
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
10 dnl Get the cflags and libraries
83aa758 this pretty much finishes the automake work for ogg
jack authored
11 dnl
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
12 AC_ARG_WITH(ogg,AC_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="")
13 AC_ARG_WITH(ogg-libraries,AC_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="")
14 AC_ARG_WITH(ogg-includes,AC_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="")
15 AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes)
83aa758 this pretty much finishes the automake work for ogg
jack authored
16
56da8ac Clearing out my backlog of autoconf updates:
volsung authored
17 if test "x$ogg_libraries" != "x" ; then
18 OGG_LIBS="-L$ogg_libraries"
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
19 elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
20 OGG_LIBS=""
56da8ac Clearing out my backlog of autoconf updates:
volsung authored
21 elif test "x$ogg_prefix" != "x" ; then
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
22 OGG_LIBS="-L$ogg_prefix/lib"
56da8ac Clearing out my backlog of autoconf updates:
volsung authored
23 elif test "x$prefix" != "xNONE" ; then
a3965f2 Missed these ones the first time through: apply the same patch that has
jsquyres authored
24 OGG_LIBS="-L$prefix/lib"
83aa758 this pretty much finishes the automake work for ogg
jack authored
25 fi
26
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
27 if test "x$ogg_prefix" != "xno" ; then
28 OGG_LIBS="$OGG_LIBS -logg"
29 fi
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
30
56da8ac Clearing out my backlog of autoconf updates:
volsung authored
31 if test "x$ogg_includes" != "x" ; then
32 OGG_CFLAGS="-I$ogg_includes"
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
33 elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
34 OGG_CFLAGS=""
cb7fc5a Whoops. Forgot an "elif".
volsung authored
35 elif test "x$ogg_prefix" != "x" ; then
56da8ac Clearing out my backlog of autoconf updates:
volsung authored
36 OGG_CFLAGS="-I$ogg_prefix/include"
7c544bc Don't set OGG_CFLAGS to -INONE/include.
brendan authored
37 elif test "x$prefix" != "xNONE"; then
56da8ac Clearing out my backlog of autoconf updates:
volsung authored
38 OGG_CFLAGS="-I$prefix/include"
39 fi
40
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
41 AC_MSG_CHECKING(for Ogg)
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
42 if test "x$ogg_prefix" = "xno" ; then
43 no_ogg="disabled"
44 enable_oggtest="no"
45 else
46 no_ogg=""
47 fi
83aa758 this pretty much finishes the automake work for ogg
jack authored
48
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
49
50 if test "x$enable_oggtest" = "xyes" ; then
51 ac_save_CFLAGS="$CFLAGS"
52 ac_save_LIBS="$LIBS"
53 CFLAGS="$CFLAGS $OGG_CFLAGS"
54 LIBS="$LIBS $OGG_LIBS"
83aa758 this pretty much finishes the automake work for ogg
jack authored
55 dnl
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
56 dnl Now check if the installed Ogg is sufficiently new.
83aa758 this pretty much finishes the automake work for ogg
jack authored
57 dnl
58 rm -f conf.oggtest
59 AC_TRY_RUN([
60 #include <stdio.h>
61 #include <stdlib.h>
62 #include <string.h>
63 #include <ogg/ogg.h>
64
65 int main ()
66 {
67 system("touch conf.oggtest");
68 return 0;
69 }
70
71 ],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
72 CFLAGS="$ac_save_CFLAGS"
73 LIBS="$ac_save_LIBS"
74 fi
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
75
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
76 if test "x$no_ogg" = "xdisabled" ; then
77 AC_MSG_RESULT(no)
78 ifelse([$2], , :, [$2])
79 elif test "x$no_ogg" = "x" ; then
83aa758 this pretty much finishes the automake work for ogg
jack authored
80 AC_MSG_RESULT(yes)
9f2f69e Applied patch to make it easier to disable use of Ogg when neeeded. Clo...
ivo authored
81 ifelse([$1], , :, [$1])
83aa758 this pretty much finishes the automake work for ogg
jack authored
82 else
83 AC_MSG_RESULT(no)
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
84 if test -f conf.oggtest ; then
85 :
83aa758 this pretty much finishes the automake work for ogg
jack authored
86 else
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
87 echo "*** Could not run Ogg test program, checking why..."
88 CFLAGS="$CFLAGS $OGG_CFLAGS"
89 LIBS="$LIBS $OGG_LIBS"
90 AC_TRY_LINK([
83aa758 this pretty much finishes the automake work for ogg
jack authored
91 #include <stdio.h>
92 #include <ogg/ogg.h>
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
93 ], [ return 0; ],
94 [ echo "*** The test program compiled, but did not run. This usually means"
95 echo "*** that the run-time linker is not finding Ogg or finding the wrong"
96 echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
97 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
98 echo "*** to the installed location Also, make sure you have run ldconfig if that"
99 echo "*** is required on your system"
100 echo "***"
101 echo "*** If you have an old version installed, it is best to remove it, although"
102 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
103 [ echo "*** The test program failed to compile or link. See the file config.log for the"
104 echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
2c71993 Fix trivial bug #104
msmith authored
105 echo "*** or that you have moved Ogg since it was installed." ])
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
106 CFLAGS="$ac_save_CFLAGS"
107 LIBS="$ac_save_LIBS"
83aa758 this pretty much finishes the automake work for ogg
jack authored
108 fi
109 OGG_CFLAGS=""
110 OGG_LIBS=""
1e8ae4d new ogg.m4 stuff. hopefully i haven't totally screwed this up
jack authored
111 ifelse([$2], , :, [$2])
83aa758 this pretty much finishes the automake work for ogg
jack authored
112 fi
113 AC_SUBST(OGG_CFLAGS)
114 AC_SUBST(OGG_LIBS)
115 rm -f conf.oggtest
116 ])
Something went wrong with that request. Please try again.