aboutsummaryrefslogtreecommitdiff
path: root/graphics/gephex/files/patch-configure.ac
blob: 9b59a1308efa409e84cc926f7229291dffc7fad4 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
--- configure.ac.orig
+++ configure.ac
@@ -126,8 +126,11 @@
 fi
 
 # qt
+saved_LDFLAGS="${LDFLAGS}"
+LDFLAGS="${LDFLAGS} %%PTHREAD_LIBS%%"
 AM_PATH_QT([2.3.0], $SHAREDLIBEXT, have_qt=yes, have_qt=no)
 AM_CONDITIONAL(HAVE_QT, test "x$have_qt" = "xyes")
+LDFLAGS="${saved_LDFLAGS}"
 
 # Checks for libraries.
 AC_CHECK_LIB(dl,dlopen,
@@ -170,11 +173,16 @@
 
 # optional libraries
 
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="${CFLAGS} -I%%LOCALBASE%%/include"
+
 CHECK_EXTRA_LIB([GL],
                 [AC_CHECK_HEADER([GL/glx.h],have_gl=yes,have_gl=no)],
                 [no], [with_gl], [have_gl], [use_gl])
 AM_CONDITIONAL([WITH_GL], test "x$use_gl" = "xyes")
 
+CFLAGS="${ac_save_CFLAGS}"
+
 CHECK_EXTRA_LIB([SDL], [AM_PATH_SDL([1.1.0], have_sdl=yes, have_sdl=no)],
                 [yes], [with_sdl], [have_sdl], [use_sdl])
 AM_CONDITIONAL([WITH_SDL], test "x$use_sdl" = "xyes")
@@ -223,7 +231,8 @@
 # libpng
 CHECK_EXTRA_LIB([LIBPNG],
                 [AC_CHECK_HEADER([png.h],have_libpng=yes,have_libpng=no)],
-                [no], [with_libpng], [have_libpng], [use_libpng])
+                [no], [with_libpng], [have_libpng], [use_libpng],
+		[AC_SUBST(PNG_LDFLAGS, "-L%%LOCALBASE%%/lib")])
 AM_CONDITIONAL([WITH_LIBPNG], test "x$use_libpng" = "xyes")
 
 # aalib
@@ -269,7 +278,7 @@
 
 # ffmpeg
 CHECK_EXTRA_LIB([FFMPEG],
-                [if test -d $srcdir/contrib/ffmpeg; then have_ffmpeg=yes; else have_ffmpeg=no; fi],
+		[have_ffmpeg=yes],
                 [yes], [with_ffmpeg], [have_ffmpeg], [use_ffmpeg])
 AM_CONDITIONAL([WITH_FFMPEG], test "x$use_ffmpeg" = "xyes")
 
@@ -345,46 +354,46 @@
 AC_DEFINE_UNQUOTED([FRBINMODULE_CACHE_SIZE], $FRBINCACHE, [Size of the cache the frbinmodule uses (in MB)])
 fi;
 
-if test "x$use_ffmpeg" = "xyes"; then
- FFMPEG_CONFIGURE_FLAGS="--prefix=$prefix --disable-ffserver --disable-ffplay --enable-shared" 
+#if test "x$use_ffmpeg" = "xyes"; then
+# FFMPEG_CONFIGURE_FLAGS="--prefix=$prefix --disable-ffserver --disable-ffplay --enable-shared" 
 #--disable-risky"
 
- echo Preparing ffmpeg configure call...
+# echo Preparing ffmpeg configure call...
  
  # If building with builddir != srcdir, ffmpegs configure wants to be
  # called with an absolute path.
  # Also, we have to do some workarounds (doc dir is missing for example).
- if test "x${srcdir}" != x.; then
-   pwd
-   (mkdir contrib && mkdir contrib/ffmpeg) || true
-    
-   if ! test -e contrib/ffmpeg/doc
-   then
-      mkdir contrib/ffmpeg/doc
-      echo "all:" > contrib/ffmpeg/doc/Makefile
-   fi
-
-   TMPDIR=`pwd` && cd ${srcdir} && absolute_srcdir=`pwd` && cd $TMPDIR
-
-   FFMPEG_CONFIG_DIR="${absolute_srcdir}/contrib/ffmpeg"
-
-   AC_SUBST(FFMPEG_DIR,"${absolute_srcdir}/contrib/ffmpeg") #TODO
- else
-   FFMPEG_CONFIG_DIR="."
-   AC_SUBST(FFMPEG_DIR,"../../../contrib/ffmpeg") #TODO
- fi
+# if test "x${srcdir}" != x.; then
+#   pwd
+#   (mkdir contrib && mkdir contrib/ffmpeg) || true
+#    
+#   if ! test -e contrib/ffmpeg/doc
+#   then
+#      mkdir contrib/ffmpeg/doc
+#      echo "all:" > contrib/ffmpeg/doc/Makefile
+#   fi
+#
+#   TMPDIR=`pwd` && cd ${srcdir} && absolute_srcdir=`pwd` && cd $TMPDIR
+#
+#   FFMPEG_CONFIG_DIR="${absolute_srcdir}/contrib/ffmpeg"
+#
+#   AC_SUBST(FFMPEG_DIR,"${absolute_srcdir}/contrib/ffmpeg") #TODO
+# else
+#   FFMPEG_CONFIG_DIR="."
+#   AC_SUBST(FFMPEG_DIR,"../../../contrib/ffmpeg") #TODO
+# fi
 
  # get absolute path of builddir
- abs_builddir=`pwd`
+# abs_builddir=`pwd`
 
- AC_SUBST(FFMPEG_LDFLAGS,"${abs_builddir}/contrib/ffmpeg/libavformat/libavformat.a ${abs_builddir}/contrib/ffmpeg/libavcodec/libavcodec.a -lz")
+ AC_SUBST(FFMPEG_LDFLAGS,"%%LOCALBASE%%/lib/libavformat.a %%LOCALBASE%%/lib/libavcodec.a -lz")
 # AC_SUBST(FFMPEG_LDFLAGS,"-L${abs_builddir}/contrib/ffmpeg/libavcodec -lavcodec -lz -L${abs_builddir}/contrib/ffmpeg/libavformat -lavformat")
- AC_SUBST(FFMPEG_CFLAGS,"-I${FFMPEG_DIR}/libavcodec -I${FFMPEG_DIR}/libavformat")
+ AC_SUBST(FFMPEG_CFLAGS,"-I%%LOCALBASE%%/include/ffmpeg")
 
- echo Calling ffmpeg configure with flags:
- echo "${FFMPEG_CONFIG_DIR}/configure $FFMPEG_CONFIGURE_FLAGS"
- cd contrib/ffmpeg/ && ${FFMPEG_CONFIG_DIR}/configure $FFMPEG_CONFIGURE_FLAGS && cd ../..
-fi
+# echo Calling ffmpeg configure with flags:
+# echo "${FFMPEG_CONFIG_DIR}/configure $FFMPEG_CONFIGURE_FLAGS"
+# cd contrib/ffmpeg/ && ${FFMPEG_CONFIG_DIR}/configure $FFMPEG_CONFIGURE_FLAGS && cd ../..
+#fi
 
 # set gphx_module_lib_dir and gphx_type_lib_dir
 test "x$prefix" = xNONE && prefix=$ac_default_prefix