]> git.sesse.net Git - vlc/blob - bootstrap
* ./bootstrap: bootstrap now requires the --config flag. With no arguments
[vlc] / bootstrap
1 #! /bin/sh
2
3 ##  bootstrap file for vlc, the VideoLAN Client
4 ##  $Id: bootstrap,v 1.27 2002/11/13 20:51:03 sam Exp $
5 ##
6 ##  Authors: Samuel Hocevar <sam@zoy.org>
7
8 ###
9 ###  get a sane environment
10 ###
11 LANG=C
12 export LANG
13
14 ##
15 ##  Give help
16 ##
17 help()
18 {
19   if test "$do_help" = "yes"
20   then
21     cat << EOF
22 recognized flags are:
23   --config        create Makefile and configure scripts (read HACKING)
24   --update-vc     update Microsoft Visual Studio files
25   --update-po     update translation files
26 EOF
27     exit 1
28   fi
29 }
30
31 ###
32 ###  argument check
33 ###
34 do_help=yes
35 do_po=no
36 do_vc=no
37 while test $# -gt 0; do
38   case "$1" in
39     --config)
40       do_help=no
41       ;;
42     --update-vc)
43       do_help=no
44       do_vc=yes
45       ;;
46     --update-po)
47       do_help=no
48       do_po=yes
49       ;;
50     *)
51       echo "$0: unknown option $1"
52       do_help=yes
53       help
54       ;;
55   esac
56   shift
57 done
58
59 ##
60 ##  Give help if needed
61 ##
62 help
63
64 ##
65 ##  Update the MSVC project files
66 ##
67 if test "$do_vc" = "yes"
68 then
69   if test ! -f Makefile
70   then
71     echo "no Makefile found, did you run ./configure?"
72     exit 1
73   fi
74
75   #  The evil ^M
76   M='\r'
77
78   #  Sources that get built under Win32
79   LIBVLC_SOURCES=`make show-libvlc-sources | grep '^X: ' | cut -b3-`
80   LIBVLC_HEADERS=`make show-libvlc-headers | grep '^X: ' | cut -b3-`
81   LIBVLC_PKG_HEADERS=`make show-libvlc-pkg-headers | grep '^X: ' | cut -b3-`
82
83   # libvlc files
84   for target in evc/libvlc.vcp msvc/libvlc.dsp
85   do
86     rm -f ${target}
87     #  Top of the project file
88     cat ${target}.in > ${target}
89     #  The source files
90     cat >> ${target} << EOF
91 # Begin Group "Source Files"${M}
92 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"${M}
93 EOF
94     for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.*/"`
95     do
96       cat >> ${target} << EOF
97 # Begin Source File${M}
98 SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
99 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
100 # End Source File${M}
101 EOF
102     done
103     for subdir in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq`
104     do
105       cat >> ${target} << EOF
106 # Begin Group "${subdir}"${M}
107 EOF
108       for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/${subdir}/"`
109       do
110       if test "${target}" = "evc/libvlc.vcp"
111       then
112         cat >> ${target} << EOF
113 # Begin Source File${M}
114 SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
115 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
116 !IF "\$(CFG)" == "vlc - Win32 (WCE MIPS) Release"${M}
117 # PROP Intermediate_Dir "MIPSRel\\${subdir}"${M}
118 # PROP Output_Dir "MIPSRel\\${subdir}"${M}
119 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE MIPS) Debug"${M}
120 # PROP Intermediate_Dir "MIPSDbg\\${subdir}"${M}
121 # PROP Output_Dir "MIPSDbg\\${subdir}"${M}
122 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH4) Release"${M}
123 # PROP Intermediate_Dir "SH4Rel\\${subdir}"${M}
124 # PROP Output_Dir "SH4Rel\\${subdir}"${M}
125 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH4) Debug"${M}
126 # PROP Intermediate_Dir "SH4Dbg\\${subdir}"${M}
127 # PROP Output_Dir "SH4Dbg\\${subdir}"${M}
128 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH3) Release"${M}
129 # PROP Intermediate_Dir "SH3Rel\\${subdir}"${M}
130 # PROP Output_Dir "SH3Rel\\${subdir}"${M}
131 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH3) Debug"${M}
132 # PROP Intermediate_Dir "SH3Dbg\\${subdir}"${M}
133 # PROP Output_Dir "SH3Dbg\\${subdir}"${M}
134 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE ARM) Release"${M}
135 # PROP Intermediate_Dir "ARMRel\\${subdir}"${M}
136 # PROP Output_Dir "ARMRel\\${subdir}"${M}
137 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE ARM) Debug"${M}
138 # PROP Intermediate_Dir "ARMDbg\\${subdir}"${M}
139 # PROP Output_Dir "ARMDbg\\${subdir}"${M}
140 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE x86em) Release"${M}
141 # PROP Intermediate_Dir "X86EMRel\\${subdir}"${M}
142 # PROP Output_Dir "X86EMRel\\${subdir}"${M}
143 !ELSEIF "\$(CFG)" == "vlc - Win32 (WCE x86em) Debug"${M}
144 # PROP Intermediate_Dir "X86EMDbg\\${subdir}"${M}
145 # PROP Output_Dir "X86EMDbg\\${subdir}"${M}
146 !ENDIF${M}
147 # End Source File${M}
148 EOF
149         else
150           cat >> ${target} << EOF
151 # Begin Source File${M}
152 SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
153 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
154 !IF "\$(CFG)" == "vlc - Win32 Release"${M}
155 # PROP Intermediate_Dir "Release\\${subdir}"${M}
156 # PROP Output_Dir "Release\\${subdir}"${M}
157 !ELSEIF "\$(CFG)" == "vlc - Win32 Debug"${M}
158 # PROP Intermediate_Dir "Debug\\${subdir}"${M}
159 # PROP Output_Dir "Debug\\${subdir}"${M}
160 !ENDIF${M}
161 # End Source File${M}
162 EOF
163         fi
164       done
165       cat >> ${target} << EOF
166 # End Group${M}
167 EOF
168     done
169     cat >> ${target} << EOF
170 # End Group${M}
171 EOF
172     #  The headers
173     cat >> ${target} << EOF
174 # Begin Group "Header Files"${M}
175 # PROP Default_Filter "h;hpp;hxx;hm;inl"${M}
176 EOF
177     for file in ${LIBVLC_HEADERS}
178     do
179       cat >> ${target} << EOF
180 # Begin Source File${M}
181 SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
182 # End Source File${M}
183 EOF
184     done
185     cat >> ${target} << EOF
186 # Begin Group "vlc"${M}
187 EOF
188     for file in ${LIBVLC_PKG_HEADERS}
189     do
190       cat >> ${target} << EOF
191 # Begin Source File${M}
192 SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
193 # End Source File${M}
194 EOF
195     done
196     cat >> ${target} << EOF
197 # End Group${M}
198 # End Group${M}
199 # End Target${M}
200 # End Project${M}
201 EOF
202   done
203
204   # plugins files
205   for target in evc/plugins.vcp msvc/plugins.dsp
206   do
207     rm -f ${target}
208     #  Top of the project file
209     cat ${target}.in > ${target}
210     #  The source files
211     cat >> ${target} << EOF
212 # Begin Group "Source Files"${M}
213 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"${M}
214 # End Group${M}
215 EOF
216     #  The headers
217     cat >> ${target} << EOF
218 # Begin Group "Header Files"${M}
219 # PROP Default_Filter "h;hpp;hxx;hm;inl"${M}
220 # End Group${M}
221 # End Target${M}
222 # End Project${M}
223 EOF
224   done
225
226   # vlc files
227   for target in evc/vlc.vcp msvc/vlc.dsp
228   do
229     rm -f ${target}
230     #  Top of the project file
231     cat ${target}.in > ${target}
232     #  The source files
233     cat >> ${target} << EOF
234 # Begin Group "Source Files"${M}
235 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"${M}
236 # Begin Source File${M}
237 EOF
238     if test "${target}" = "evc/vlc.vcp"
239     then
240       cat >> ${target} << EOF
241 SOURCE="..\\evc\\vlc.c"${M}
242 EOF
243     else
244       cat >> ${target} << EOF
245 SOURCE="..\\src\\vlc.c"${M}
246 EOF
247     fi
248     cat >> ${target} << EOF
249 # End Source File${M}
250 # End Group${M}
251 EOF
252     #  Bottom of the project file - handles resource files too
253     cat ${target}.out >> ${target}
254   done
255
256   exit 0
257 fi
258
259 ##
260 ##  Update the potfiles because no one ever does it
261 ##
262 if test "$do_po" = "yes"
263 then
264   cd po
265   make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
266   cd ..
267
268   exit 0
269 fi
270
271 ##
272 ## Check that our tools don't suck
273 ##
274 SEDSUCKS=no
275 if test ! 20000 -eq `perl -e 'printf "%s\n","a"x20000' | sed -e 's/.//' 2>/dev/null | wc -c`
276 then
277   SEDSUCKS=yes
278 fi
279
280 PERLSUCKS=no
281 AUTOMAKESUCKS=no
282
283 ##
284 ## Generate the modules makefile, by parsing modules/**/Modules.am
285 ##
286
287 printf "generating Modules.am and configure.ac"
288
289 echo > Modules.am
290 echo > configure.ac
291
292 ALL_FLAGS="`sed -n -e '/^[^=A-Z]*[A-Z]*FLAGS_[^=]*=/s/[^=A-Z]*\([A-Z]*FLAGS_[^=]*=\).*/\1/p' < configure.ac.in | sort | uniq`"
293
294 cat >> configure.ac << EOF
295 dnl ################################################################
296 dnl # Do not edit this file, it was generated from configure.ac.in #
297 dnl ################################################################
298
299 EOF
300 sed -n -e '/dnl do not touch this line/q;p' < configure.ac.in >> configure.ac
301
302 modules=""
303 for mf in `sed -ne 's@[^a-z]*\([^ ]*\)am.*@modules/\1am@p' < modules/Makefile.am`
304 do
305   printf "."
306   dir=`echo ${mf} | sed -e 's@\(.*\)/.*@\1@'`
307   topdir=`echo ${dir} | cut -f2 -d/`
308   sym=`echo ${dir} | sed -e 'y@/@_@'`
309   cat >> Modules.am << EOF
310 # Directory ${dir}
311
312 include ${dir}/Modules.am
313
314 EOF
315   sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | while read mod
316   do
317     LINKER="LINK"
318     if echo "$ALL_FLAGS" | grep '^CPPFLAGS_'${mod}'=$' >/dev/null 2>&1; then
319         echo "AC_SUBST(CPPFLAGS_${mod})" >> configure.ac; fi
320     if echo "$ALL_FLAGS" | grep '^CFLAGS_'${mod}'=$' >/dev/null 2>&1; then
321         echo "AC_SUBST(CFLAGS_${mod})" >> configure.ac; fi
322     if echo "$ALL_FLAGS" | grep '^CXXFLAGS_'${mod}'=$' >/dev/null 2>&1; then
323         LINKER="CXXLINK"
324         echo "AC_SUBST(CXXFLAGS_${mod})" >> configure.ac; fi
325     if echo "$ALL_FLAGS" | grep '^OBJCFLAGS_'${mod}'=$' >/dev/null 2>&1; then
326         LINKER="OBJCLINK"
327         echo "AC_SUBST(OBJCFLAGS_${mod})" >> configure.ac; fi
328     if echo "$ALL_FLAGS" | grep '^LDFLAGS_'${mod}'=$' >/dev/null 2>&1; then
329         echo "AC_SUBST(LDFLAGS_${mod})" >> configure.ac; fi
330     if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then
331         PRIVATE='#'; else
332         PRIVATE=''; fi
333     if grep '^nodist_SOURCES_'${mod}'' < ${mf} >/dev/null 2>&1; then
334         NODIST=''; else
335         NODIST='#'; fi
336     cat >> configure.ac << EOF
337 AM_CONDITIONAL(${mod}_plugin, test x\$${mod}_plugin = xyes)
338 AM_CONDITIONAL(${mod}_builtin, test x\$${mod}_builtin = xyes)
339 EOF
340 # Generation of Modules.am
341 # ~~~~~~~~~~~~~~~~~~~~~~~~
342 # - L_ is for LIBRARIES_, D_ for DATA_, B_ for BUILT_SOURCES_, F_ for LDFLAGS_,
343 #   S_ for SOURCES_, _p is for _plugin, _b is for _builtin. This is to reduce
344 #   the resulting file size.
345 # - *_CFLAGS, *_CXXFLAGS etc. include *_CPPFLAGS because per-object CPPFLAGS
346 #   does not seem to work properly with any automake version I tested.
347     cat >> Modules.am << EOF
348 # The ${mod} plugin
349
350 if ${mod}_plugin
351 if UNTRUE
352 L_${mod}_p = ${dir}/lib${mod}_plugin.a
353 endif
354 D_${mod}_p = ${dir}/lib${mod}_plugin\$(LIBEXT)
355 ${NODIST}B_${mod}_p = \$(nodist_SOURCES_${mod})
356 endif
357 if ${mod}_builtin
358 L_${mod}_b = ${dir}/lib${mod}.a
359 F_${mod}_b = \$(LDFLAGS_${mod})
360 if BUILD_MOZILLA
361 L_${mod}_pic = ${dir}/lib${mod}_pic.a
362 endif
363 ${NODIST}B_${mod}_b = \$(nodist_SOURCES_${mod})
364 endif
365
366 L_builtin += \$(L_${mod}_b)
367 L_builtin_pic += \$(L_${mod}_pic)
368 LDFLAGS_builtin += \$(F_${mod}_b)
369 ${PRIVATE}BUILT_SOURCES += \$(B_${mod}_p) \$(B_${mod}_b)
370 PLUGIN_FILES += \$(D_${mod}_p)
371
372 ${PRIVATE}${sym}_lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
373 ${NODIST}${PRIVATE}nodist_${sym}_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
374 ${sym}_lib${mod}_plugin_a_CPPFLAGS = \$(CPPFLAGS_plugin) \$(CPPFLAGS_${mod}) -DMODULE_NAME=${mod} -DMODULE_NAME_IS_${mod}
375 ${sym}_lib${mod}_plugin_a_CFLAGS = \$(CFLAGS_plugin) \$(CFLAGS_${mod}) \$(${sym}_lib${mod}_plugin_a_CPPFLAGS)
376 ${sym}_lib${mod}_plugin_a_CXXFLAGS = \$(CXXFLAGS_plugin) \$(CXXFLAGS_${mod}) \$(${sym}_lib${mod}_plugin_a_CPPFLAGS)
377 ${sym}_lib${mod}_plugin_a_OBJCFLAGS = \$(OBJCFLAGS_plugin) \$(OBJCFLAGS_${mod}) \$(${sym}_lib${mod}_plugin_a_CPPFLAGS)
378
379 ${sym}_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
380 ${NODIST}nodist_${sym}_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
381 ${sym}_lib${mod}_pic_a_CPPFLAGS = \$(CPPFLAGS_builtin_pic) \$(CPPFLAGS_${mod}) -DMODULE_NAME=${mod} -DMODULE_NAME_IS_${mod}
382 ${sym}_lib${mod}_pic_a_CFLAGS = \$(CFLAGS_builtin_pic) \$(CFLAGS_${mod}) \$(${sym}_lib${mod}_pic_a_CPPFLAGS)
383 ${sym}_lib${mod}_pic_a_CXXFLAGS = \$(CXXFLAGS_builtin_pic) \$(CXXFLAGS_${mod}) \$(${sym}_lib${mod}_pic_a_CPPFLAGS)
384 ${sym}_lib${mod}_pic_a_OBJCFLAGS = \$(OBJCFLAGS_builtin_pic) \$(OBJCFLAGS_${mod}) \$(${sym}_lib${mod}_pic_a_CPPFLAGS)
385
386 ${sym}_lib${mod}_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
387 ${NODIST}nodist_${sym}_lib${mod}_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
388 ${sym}_lib${mod}_a_CPPFLAGS = \$(CPPFLAGS_builtin) \$(CPPFLAGS_${mod}) -DMODULE_NAME=${mod} -DMODULE_NAME_IS_${mod}
389 ${sym}_lib${mod}_a_CFLAGS = \$(CFLAGS_builtin) \$(CFLAGS_${mod}) \$(${sym}_lib${mod}_a_CPPFLAGS)
390 ${sym}_lib${mod}_a_CXXFLAGS = \$(CXXFLAGS_builtin) \$(CXXFLAGS_${mod}) \$(${sym}_lib${mod}_a_CPPFLAGS)
391 ${sym}_lib${mod}_a_OBJCFLAGS = \$(OBJCFLAGS_builtin) \$(OBJCFLAGS_${mod}) \$(${sym}_lib${mod}_a_CPPFLAGS)
392
393 libvlc_LIBRARIES += \$(L_${mod}_b) \$(L_${mod}_pic)
394 lib${mod}_DATA = \$(D_${mod}_p)
395
396 lib${mod}dir = \$(libdir)/vlc/${topdir}
397 ${PRIVATE}noinst_LIBRARIES += \$(L_${mod}_p)
398 ${PRIVATE}${dir}/lib${mod}_plugin\$(LIBEXT): \$(${sym}_lib${mod}_plugin_a_OBJECTS)
399 ${PRIVATE}      \$(${LINKER}) \$^ -shared \$(LDFLAGS_plugins) \$(LDFLAGS_${mod})
400
401
402 EOF
403   done
404 done
405
406 echo "AM_CONDITIONAL(UNTRUE, false)" >> configure.ac
407 sed -n -e '/dnl do not touch this line/,//p' < configure.ac.in >> configure.ac
408
409 echo "done."
410
411 ###
412 ###  classic bootstrap stuff
413 ###
414 set -x
415 rm -f aclocal.m4 m4/oldgettext.m4 configure config.guess config.log config.sub ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh
416 rm -Rf intl
417
418 # Check for gettext
419 if gettextize --version >/dev/null 2>&1
420 then
421 if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \
422         '>' 0.11.2 >/dev/null 2>&1
423 then
424   # We have gettext, and a recent version! Everything is cool.
425   autopoint || exit 1
426   GETTEXT=yes
427 else
428   # User's gettext is too old. try to continue anyway.
429   mkdir -p intl
430   echo > intl/Makefile.am
431   echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/oldgettext.m4
432   GETTEXT=old
433 fi;else
434   # we don't have gettext. grmbl. try to continue anyway.
435   mkdir -p intl
436   echo > intl/Makefile.am
437   echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/oldgettext.m4
438   GETTEXT=no
439 fi
440
441 # Check for automake
442 amvers="none"
443 if automake-1.7 --version >/dev/null 2>&1
444 then
445   amvers="-1.7"
446 else
447   if automake-1.6 --version >/dev/null 2>&1
448   then
449     amvers="-1.6"
450     if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" "<=" "1.6.1" > /dev/null 2>&1
451     then AUTOMAKESUCKS=yes
452     fi
453   else
454     if automake-1.5 --version >/dev/null 2>&1
455     then
456       amvers="-1.5"
457     else
458       if automake --version > /dev/null 2>&1
459       then
460         amvers=`automake --version | sed -e '1s/[^0-9]*//' -e q`
461         case $amvers in
462         1.6|1.6.0|1.6.1)
463           AUTOMAKESUCKS=yes ;;
464         esac
465
466         if expr "$amvers" "<" "1.5" > /dev/null 2>&1
467         then amvers="none"
468         else amvers=""
469         fi
470       fi
471     fi
472   fi
473 fi
474
475 if test x$amvers = xnone
476 then
477   set +x
478   echo "you need automake version 1.5 or later"
479   exit 1
480 fi
481
482 # Do the rest
483 aclocal${amvers} -I m4 || exit 1
484 autoheader || exit 1
485
486 automake${amvers} --foreign --add-missing --copy || PERLSUCKS=yes
487
488 case "$PERLSUCKS" in
489   no)
490   ;;
491   yes)
492     set +x
493     echo ""
494     echo "==========================================================="
495     echo "IMPORTANT NOTE: automake failed. On certain systems this is"
496     echo "because of insufficient stack size. Please set the stack"
497     echo "size to something bigger or unlimited (\`unlimit stacksize')"
498     echo "and try again."
499     exit 1
500   ;;
501 esac
502
503 # Wrap automake's long lines, because the Solaris sed doesn't support lines
504 # longer than 3999 characters, and ./configure calls sed. We use Perl instead
505 # of sed for obvious reasons :)
506 perl -ne 'if(/^.{500}/) {s/(.{200}[^ ]* )/$1\\\n\t/g} print $_' < Makefile.in > Makefile.in.tmp && mv Makefile.in.tmp Makefile.in
507
508 autoconf || exit 1
509
510 ##
511 ##  headers which need to be regenerated
512 ##
513 rm -f src/misc/modules_builtin.h src/misc/modules_plugin.h
514 rm -f include/vlc_symbols.h
515 rm -f mozilla/vlcintf.h
516
517 ##
518 ##  Shut up
519 ##
520 set +x
521
522 ##
523 ##  Glade sometimes sucks
524 ##
525 echo "workarounds for annoying glade features"
526 for file in gnome_interface.c gtk_interface.c
527 do
528 if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
529 then
530     rm -f /tmp/$$.$file.bak
531     cat > /tmp/$$.$file.bak << EOF
532 /* This file was created automatically by glade and fixed by bootstrap */
533
534 #include <vlc/vlc.h>
535 EOF
536     sed -e 1,7d \
537         -e 's#_("-:--:--")#"-:--:--"#' \
538         -e 's#_("---")#"---"#' \
539         -e 's#_("--")#"--"#' \
540         -e 's#_("/dev/dvd")#"/dev/dvd"#' \
541         -e 's#_(\("./."\))#\1#' \
542         < modules/gui/gtk/$file >> /tmp/$$.$file.bak
543     mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
544 fi
545 done
546
547 file=gtk_support.h
548 if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
549 then
550     rm -f /tmp/$$.$file.bak
551     sed -e 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < modules/gui/gtk/$file > /tmp/$$.$file.bak
552     mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
553 fi
554
555 ##
556 ##  Tell the user about gettext and sed
557 ##
558 case "$GETTEXT" in
559   yes)
560   ;;
561   no)
562     echo ""
563     echo "==========================================================="
564     echo "IMPORTANT NOTE: you do not have gettext installed on your"
565     echo "system. The vlc build will work, but you will not have"
566     echo "internationalization support. We suggest installing gettext."
567   ;;
568   old)
569     echo ""
570     echo "=========================================================="
571     echo "NOTE: you have an old version of gettext installed on your"
572     echo "system. We suggest upgrading to gettext 0.11.3 or later."
573   ;;
574 esac
575
576 case "$AUTOMAKESUCKS" in
577   no)
578   ;;
579   yes)
580     echo ""
581     echo "============================================================="
582     echo "IMPORTANT NOTE: your version of automake has a bug which will"
583     echo "prevent proper plugin compilation. Either compile VLC with"
584     echo "the --disable-plugins flag, or use a version of automake newer"
585     echo "than 1.6.1 (1.6.2 is OK, and so are the 1.5 series)."
586   ;;
587 esac
588
589 case "$SEDSUCKS" in
590   no)
591   ;;
592   yes)
593     echo ""
594     echo "============================================================="
595     echo "IMPORTANT NOTE: the version of 'sed' on your system is unable"
596     echo "to handle long lines. bootstrap will try its best to generate"
597     echo "a correct Makefile, but you should expect problems. We highly"
598     echo "recommend installing GNU sed."
599   ;;
600 esac
601