From be0d133238b9e95e557f25d1c1cadd96e19932a9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 21 Mar 2016 04:50:06 +0100 Subject: [PATCH] CONFIGURE: Extend Linux CD check and run it on Linux only. --- configure | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/configure b/configure index c958e9acf039..8d778db2781b 100755 --- a/configure +++ b/configure @@ -4261,15 +4261,24 @@ define_in_config_if_yes "$_opengles" "USE_GLES" # # Check for Linux CD-ROM support # -echocheck "Linux CD-ROM" -linuxcd=no -cat > $TMPC << EOF +case $_host_os in + *linux*) + echocheck "Linux CD-ROM" + linuxcd=no + cat > $TMPC << EOF #include -int main(void) { int x = CDROMREADAUDIO; return 0; } +#include +int main(void) { + int x = CDROMREADAUDIO; + dev_t dev; + return major(dev) + x; +} EOF -cc_check && linuxcd=yes -define_in_config_if_yes "$linuxcd" 'USE_LINUXCD' -echo "$linuxcd" + cc_check && linuxcd=yes + define_in_config_if_yes "$linuxcd" 'USE_LINUXCD' + echo "$linuxcd" + ;; +esac #