config.lib
changeset 11183 b8c8569d24fd
parent 11052 81b8c4c90ff8
equal deleted inserted replaced
11182:22f2cfb1f1f0 11183:b8c8569d24fd
    50 	with_application_bundle="1"
    50 	with_application_bundle="1"
    51 	with_sdl="1"
    51 	with_sdl="1"
    52 	with_cocoa="1"
    52 	with_cocoa="1"
    53 	with_zlib="1"
    53 	with_zlib="1"
    54 	with_png="1"
    54 	with_png="1"
       
    55 	with_curl="1"
    55 	with_makedepend="1"
    56 	with_makedepend="1"
    56 	with_direct_music="1"
    57 	with_direct_music="1"
    57 	with_sort="1"
    58 	with_sort="1"
    58 	with_iconv="1"
    59 	with_iconv="1"
    59 	with_midi=""
    60 	with_midi=""
   107 		with_application_bundle
   108 		with_application_bundle
   108 		with_sdl
   109 		with_sdl
   109 		with_cocoa
   110 		with_cocoa
   110 		with_zlib
   111 		with_zlib
   111 		with_png
   112 		with_png
       
   113 		with_curl
   112 		with_makedepend
   114 		with_makedepend
   113 		with_direct_music
   115 		with_direct_music
   114 		with_sort
   116 		with_sort
   115 		with_iconv
   117 		with_iconv
   116 		with_midi
   118 		with_midi
   260 			--with-png=*)                 with_png="$optarg";;
   262 			--with-png=*)                 with_png="$optarg";;
   261 			--with-libpng)                with_png="2";;
   263 			--with-libpng)                with_png="2";;
   262 			--without-libpng)             with_png="0";;
   264 			--without-libpng)             with_png="0";;
   263 			--with-libpng=*)              with_png="$optarg";;
   265 			--with-libpng=*)              with_png="$optarg";;
   264 
   266 
       
   267             --with-curl)                  with_curl="2";;
       
   268 			--without-curl)               with_curl="0";;
       
   269 			--with-curl=*)                with_curl="$optarg";;
       
   270 			--with-libcurl)               with_curl="2";;
       
   271 			--without-libcurl)            with_curl="0";;
       
   272 			--with-libcurl=*)             with_curl="$optarg";;
       
   273 
   265 			--with-libtimidity)           with_libtimidity="2";;
   274 			--with-libtimidity)           with_libtimidity="2";;
   266 			--without-libtimidity)        with_libtimidity="0";;
   275 			--without-libtimidity)        with_libtimidity="0";;
   267 			--with-libtimidity=*)         with_libtimidity="$optarg";;
   276 			--with-libtimidity=*)         with_libtimidity="$optarg";;
   268 
   277 
   269 			--with-freetype)              with_freetype="2";;
   278 			--with-freetype)              with_freetype="2";;
   560 		log 1 "checking assert... disabled"
   569 		log 1 "checking assert... disabled"
   561 	fi
   570 	fi
   562 
   571 
   563 	detect_zlib
   572 	detect_zlib
   564 	detect_png
   573 	detect_png
       
   574 	detect_curl
   565 	detect_freetype
   575 	detect_freetype
   566 	detect_fontconfig
   576 	detect_fontconfig
   567 	detect_iconv
   577 	detect_iconv
   568 	detect_pspconfig
   578 	detect_pspconfig
   569 	detect_libtimidity
   579 	detect_libtimidity
  1081 				LIBS="$LIBS `$png_config --static --ldflags | tr '\n\r' '  '`"
  1091 				LIBS="$LIBS `$png_config --static --ldflags | tr '\n\r' '  '`"
  1082 			fi
  1092 			fi
  1083 		else
  1093 		else
  1084 			LIBS="$LIBS `$png_config --ldflags | tr '\n\r' '  '`"
  1094 			LIBS="$LIBS `$png_config --ldflags | tr '\n\r' '  '`"
  1085 		fi
  1095 		fi
       
  1096     fi
       
  1097 
       
  1098     if [ -n "$curl_config" ]; then
       
  1099 		CFLAGS="$CFLAGS -DWITH_CURL"
       
  1100 		CFLAGS="$CFLAGS `$curl_config --cflags  | tr '\n\r' '  '`"
       
  1101         
       
  1102         # XXX: does this break on enable_static? curl-config doesn't take a --static option
       
  1103         LIBS="$LIBS `$curl_config --libs | tr '\n\r' '  '`"
  1086 	fi
  1104 	fi
  1087 
  1105 
  1088 	if [ -n "$fontconfig_config" ]; then
  1106 	if [ -n "$fontconfig_config" ]; then
  1089 		CFLAGS="$CFLAGS -DWITH_FONTCONFIG"
  1107 		CFLAGS="$CFLAGS -DWITH_FONTCONFIG"
  1090 		CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' '  '`"
  1108 		CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' '  '`"
  1839 		png_config=""
  1857 		png_config=""
  1840 		return 0
  1858 		return 0
  1841 	fi
  1859 	fi
  1842 
  1860 
  1843 	log 1 "checking libpng... found"
  1861 	log 1 "checking libpng... found"
       
  1862 }
       
  1863 
       
  1864 detect_curl() {
       
  1865 	# 0 means no, 1 is auto-detect, 2 is force
       
  1866 	if [ "$with_curl" = "0" ]; then
       
  1867 		log 1 "checking curl... disabled"
       
  1868 
       
  1869 		curl_config=""
       
  1870 		return 0
       
  1871 	fi
       
  1872 
       
  1873 	if [ "$with_curl" = "1" ] || [ "$with_curl" = "" ] || [ "$with_curl" = "2" ]; then
       
  1874 		curl_config="curl-config"
       
  1875 	else
       
  1876 		curl_config="$with_curl"
       
  1877 	fi
       
  1878 
       
  1879 	version=`$curl_config --version 2>/dev/null`
       
  1880 	ret=$?
       
  1881 	log 2 "executing $curl_config --version"
       
  1882 	log 2 "  returned $version"
       
  1883 	log 2 "  exit code $ret"
       
  1884 
       
  1885 	if [ -z "$version" ] || [ "$ret" != "0" ]; then
       
  1886 		log 1 "checking libcurl... not found"
       
  1887 
       
  1888 		# It was forced, so it should be found.
       
  1889 		if [ "$with_curl" != "1" ]; then
       
  1890 			log 1 "configure: error: curl-config couldn't be found"
       
  1891 			log 1 "configure: error: you supplied '$with_curl', but it seems invalid"
       
  1892 			exit 1
       
  1893 		fi
       
  1894 
       
  1895 		curl_config=""
       
  1896 		return 0
       
  1897 	fi
       
  1898 
       
  1899 	log 1 "checking libcurl... found"
       
  1900 
  1844 }
  1901 }
  1845 
  1902 
  1846 detect_freetype() {
  1903 detect_freetype() {
  1847 	# 0 means no, 1 is auto-detect, 2 is force
  1904 	# 0 means no, 1 is auto-detect, 2 is force
  1848 	if [ "$with_freetype" = "0" ]; then
  1905 	if [ "$with_freetype" = "0" ]; then
  2376 	echo "                                 midi-player"
  2433 	echo "                                 midi-player"
  2377 	echo "  --with-cocoa                   enables COCOA video driver (OSX ONLY)"
  2434 	echo "  --with-cocoa                   enables COCOA video driver (OSX ONLY)"
  2378 	echo "  --with-sdl[=sdl-config]        enables SDL video driver support"
  2435 	echo "  --with-sdl[=sdl-config]        enables SDL video driver support"
  2379 	echo "  --with-zlib[=zlib.a]           enables zlib support"
  2436 	echo "  --with-zlib[=zlib.a]           enables zlib support"
  2380 	echo "  --with-png[=libpng-config]     enables libpng support"
  2437 	echo "  --with-png[=libpng-config]     enables libpng support"
       
  2438 	echo "  --with-curl[=curl-config]      enables libcurl support"
  2381 	echo "  --with-freetype[=freetype-config]"
  2439 	echo "  --with-freetype[=freetype-config]"
  2382 	echo "                                 enables libfreetype support"
  2440 	echo "                                 enables libfreetype support"
  2383 	echo "  --with-fontconfig[=pkg-config fontconfig]"
  2441 	echo "  --with-fontconfig[=pkg-config fontconfig]"
  2384 	echo "                                 enables fontconfig support"
  2442 	echo "                                 enables fontconfig support"
  2385 	echo "  --with-iconv[=iconv-path]      enables iconv support"
  2443 	echo "  --with-iconv[=iconv-path]      enables iconv support"