Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-Android
Commits
0604f3fe
Commit
0604f3fe
authored
Feb 19, 2015
by
Thomas Guillem
Browse files
compile-libvlc.sh: replace ugly config_undef hack by good exports
parent
71312f60
Changes
1
Show whitespace changes
Inline
Side-by-side
compile-libvlc.sh
View file @
0604f3fe
...
@@ -476,8 +476,6 @@ cd ../../
...
@@ -476,8 +476,6 @@ cd ../../
if
[
"
${
CHROME_OS
}
"
=
"1"
]
;
then
if
[
"
${
CHROME_OS
}
"
=
"1"
]
;
then
VLC_BUILD_DIR
=
build-chrome-
${
TARGET_TUPLE
}
VLC_BUILD_DIR
=
build-chrome-
${
TARGET_TUPLE
}
export
ac_cv_func_eventfd
=
no
export
ac_cv_header_sys_eventfd_h
=
no
else
else
VLC_BUILD_DIR
=
build-android-
${
TARGET_TUPLE
}
VLC_BUILD_DIR
=
build-android-
${
TARGET_TUPLE
}
fi
fi
...
@@ -488,6 +486,22 @@ mkdir -p $VLC_BUILD_DIR && cd $VLC_BUILD_DIR
...
@@ -488,6 +486,22 @@ mkdir -p $VLC_BUILD_DIR && cd $VLC_BUILD_DIR
#############
#############
if
[
!
-e
./config.h
]
;
then
if
[
!
-e
./config.h
]
;
then
if
[
"
${
CHROME_OS
}
"
=
"1"
]
;
then
# chrome OS doesn't have eventfd
export
ac_cv_func_eventfd
=
no
export
ac_cv_header_sys_eventfd_h
=
no
fi
if
[
${
ANDROID_API
}
=
"android-21"
]
;
then
# android-21 has empty sys/shm.h headers that triggers shm detection but it
# doesn't have any shm functions and/or symbols. */
export
ac_cv_header_sys_shm_h
=
no
fi
if
[
${
ANDROID_ABI
}
=
"x86"
-a
${
ANDROID_API
}
!=
"android-21"
]
;
then
# NDK x86 libm.so has nanf symbol but no nanf definition, we don't known if
# intel devices has nanf. Assume they don't have it.
export
ac_cv_lib_m_nanf
=
no
fi
CPPFLAGS
=
"
$CPPFLAGS
"
\
CPPFLAGS
=
"
$CPPFLAGS
"
\
CFLAGS
=
"
$CFLAGS
${
VLC_EXTRA_CFLAGS
}
${
EXTRA_CFLAGS
}
"
\
CFLAGS
=
"
$CFLAGS
${
VLC_EXTRA_CFLAGS
}
${
EXTRA_CFLAGS
}
"
\
CXXFLAGS
=
"
$CFLAGS
"
\
CXXFLAGS
=
"
$CFLAGS
"
\
...
@@ -504,41 +518,6 @@ sh ../configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux \
...
@@ -504,41 +518,6 @@ sh ../configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux \
checkfail
"vlc: configure failed"
checkfail
"vlc: configure failed"
fi
fi
# ANDROID NDK FIXUP (BLAME GOOGLE)
config_undef
()
{
unamestr
=
`
uname
`
if
[[
"
$unamestr
"
==
'Darwin'
]]
;
then
previous_change
=
`
stat
-f
"%Sm"
-t
"%y%m%d%H%M.%S"
config.h
`
sed
-i
''
's,#define '
$1
' 1,/\* #undef '
$1
' \*/,'
config.h
touch
-t
"
$previous_change
"
config.h
else
previous_change
=
`
stat
-c
"%y"
config.h
`
sed
-i
's,#define '
$1
' 1,/\* #undef '
$1
' \*/,'
config.h
# don't change modified date in order to don't trigger a full build
touch
-d
"
$previous_change
"
config.h
fi
}
# if config dependencies change, ./config.status
# is run and overwrite previously hacked config.h. So call make config.h here
# and hack config.h after.
make
$MAKEFLAGS
config.h
checkfail
"vlc: make config.h failed"
if
[
${
ANDROID_ABI
}
=
"x86"
-a
${
ANDROID_API
}
!=
"android-21"
]
;
then
# NDK x86 libm.so has nanf symbol but no nanf definition, we don't known if
# intel devices has nanf. Assume they don't have it.
config_undef HAVE_NANF
fi
if
[
${
ANDROID_API
}
=
"android-21"
]
;
then
# android-21 has empty sys/shm.h headers that triggers shm detection but it
# doesn't have any shm functions and/or symbols. */
config_undef HAVE_SYS_SHM_H
fi
# END OF ANDROID NDK FIXUP
############
############
# BUILDING #
# BUILDING #
############
############
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment