comparison configure @ 6191:26a980dbc9a5

The 3 X11 checks (header/lib/functionnality) are now together. Tests for header & lib enhanced (check for Xlib.h and libX11.so/a) (Suggestion by Arpi)
author pl
date Sat, 25 May 2002 21:43:02 +0000
parents b9d4d6d80369
children f01f6fd93ce8
comparison
equal deleted inserted replaced
6190:bd6748605681 6191:26a980dbc9a5
1810 _def_vsscanf='#undef HAVE_VSSCANF' 1810 _def_vsscanf='#undef HAVE_VSSCANF'
1811 fi 1811 fi
1812 echores "$_vsscanf" 1812 echores "$_vsscanf"
1813 1813
1814 1814
1815 echocheck "X11 headers" 1815 #########
1816 # VIDEO #
1817 #########
1818
1819
1820 echocheck "3dfx"
1821 if test "$_3dfx" = yes ; then
1822 _def_3dfx='#define HAVE_3DFX 1'
1823 _vosrc="$_vosrc vo_3dfx.c"
1824 _vomodules="3dfx $_vomodules"
1825 else
1826 _def_3dfx='#undef HAVE_3DFX'
1827 _novomodules="3dfx $_novomodules"
1828 fi
1829 echores "$_3dfx"
1830
1831
1832 echocheck "tdfxfb"
1833 if test "$_tdfxfb" = yes ; then
1834 _def_tdfxfb='#define HAVE_TDFXFB 1'
1835 _vosrc="$_vosrc vo_tdfxfb.c"
1836 _vomodules="tdfxfb $_vomodules"
1837 else
1838 _def_tdfxfb='#undef HAVE_TDFXFB'
1839 _novomodules="tdfxfb $_novomodules"
1840 fi
1841 echores "$_tdfxfb"
1842
1843
1844 echocheck "DirectFB"
1845 if test "$_directfb" = auto ; then
1846 _directfb=no
1847 cat > $TMPC <<EOF
1848 #include <directfb.h>
1849 int main(void) { IDirectFB *foo; return 0; }
1850 EOF
1851 linux && test -c /dev/fb0 && cc_check -ldirectfb && _directfb=yes
1852 fi
1853 if test "$_directfb" = yes ; then
1854 _def_directfb='#define HAVE_DIRECTFB 1'
1855 _vosrc="$_vosrc vo_directfb.c"
1856 _vomodules="directfb $_vomodules"
1857 _ld_directfb='-ldirectfb'
1858 else
1859 _def_directfb='#undef HAVE_DIRECTFB'
1860 _novomodules="directfb $_novomodules"
1861 fi
1862 echores "$_directfb"
1863
1864 if test "$_directfb" = yes; then
1865 echocheck "DirectFB >= 0.9.9"
1866 _directfb099=no
1867 cat > $TMPC <<EOF
1868 #include <directfb.h>
1869 int main(void) { IDirectFBEventBuffer *foo; return 0; }
1870 EOF
1871 cc_check -ldirectfb && _directfb099=yes
1872 if test "$_directfb099" = yes ; then
1873 _def_directfb099='#define HAVE_DIRECTFB099 1'
1874 else
1875 _def_directfb099='#undef HAVE_DIRECTFB099'
1876 fi
1877 echores "$_directfb099"
1878 fi
1879 if test "$_directfb" = yes; then
1880 echocheck "DirectFB >= 0.9.10"
1881 _directfb0910=no
1882 cat > $TMPC <<EOF
1883 #include <directfb.h>
1884 int main(void) { DFBDisplayLayerCapabilities caps=DLCAPS_DST_COLORKEY; return 0; }
1885 EOF
1886 cc_check -ldirectfb && _directfb0910=yes
1887 if test "$_directfb0910" = yes ; then
1888 _def_directfb0910='#define HAVE_DIRECTFB0910 1'
1889 else
1890 _def_directfb0910='#undef HAVE_DIRECTFB0910'
1891 fi
1892 echores "$_directfb0910"
1893 fi
1894
1895
1896 echocheck "X11 headers presence"
1816 if test -z "$_inc_x11" ; then 1897 if test -z "$_inc_x11" ; then
1817 for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do 1898 for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do
1818 if test -d "$I/X11" ; then 1899 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
1819 _inc_x11="-I$I" 1900 _inc_x11="-I$I"
1820 echores "yes (using $I)" 1901 echores "yes (using $I)"
1821 break 1902 break
1822 fi 1903 fi
1823 done 1904 done
1824 if test -z "$_inc_x11" ; then 1905 if test -z "$_inc_x11" ; then
1825 _x11=no 1906 _x11=no
1826 echores "not found" 1907 echores "not found (check if the dev(el) packages are installed)"
1827 fi 1908 fi
1828 else 1909 else
1829 echores "yes (using $_inc_x11)" 1910 echores "yes (using $_inc_x11)"
1830 fi 1911 fi
1831 if test "$_inc_x11" = "-I/usr/include" ; then 1912 if test "$_inc_x11" = "-I/usr/include" ; then
1832 _inc_x11="" 1913 _inc_x11=""
1833 fi 1914 fi
1834 1915
1835 1916
1836 echocheck "X11 libs" 1917 echocheck "X11 libs presence"
1837 if test -z "$_ld_x11" ; then 1918 if test -z "$_ld_x11" ; then
1838 for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 ; do 1919 for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 ; do
1839 if test -d "$I" ; then 1920 if test -d "$I" && ( test -f "$I/libX11.so" || test -f "$I/libX11.a" ) ; then
1840 _ld_x11="-L$I" 1921 _ld_x11="-L$I"
1841 echores "yes (using $I)" 1922 echores "yes (using $I)"
1842 break; 1923 break;
1843 fi 1924 fi
1844 done 1925 done
1845 if test -z "$_ld_x11" ; then 1926 if test -z "$_ld_x11" ; then
1846 _x11=no 1927 _x11=no
1847 echores "not found" 1928 echores "not found (check if the dev(el) packages are installed)"
1848 fi 1929 fi
1849 else 1930 else
1850 echores "yes (using $_ld_x11)" 1931 echores "yes (using $_ld_x11)"
1851 fi 1932 fi
1852 _ld_x11="$_ld_x11 -lX11 -lXext $_ld_sock" 1933 _ld_x11="$_ld_x11 -lX11 -lXext $_ld_sock"
1853 1934
1854 1935
1855 #########
1856 # VIDEO #
1857 #########
1858
1859
1860 echocheck "3dfx"
1861 if test "$_3dfx" = yes ; then
1862 _def_3dfx='#define HAVE_3DFX 1'
1863 _vosrc="$_vosrc vo_3dfx.c"
1864 _vomodules="3dfx $_vomodules"
1865 else
1866 _def_3dfx='#undef HAVE_3DFX'
1867 _novomodules="3dfx $_novomodules"
1868 fi
1869 echores "$_3dfx"
1870
1871
1872 echocheck "tdfxfb"
1873 if test "$_tdfxfb" = yes ; then
1874 _def_tdfxfb='#define HAVE_TDFXFB 1'
1875 _vosrc="$_vosrc vo_tdfxfb.c"
1876 _vomodules="tdfxfb $_vomodules"
1877 else
1878 _def_tdfxfb='#undef HAVE_TDFXFB'
1879 _novomodules="tdfxfb $_novomodules"
1880 fi
1881 echores "$_tdfxfb"
1882
1883
1884 echocheck "DirectFB"
1885 if test "$_directfb" = auto ; then
1886 _directfb=no
1887 cat > $TMPC <<EOF
1888 #include <directfb.h>
1889 int main(void) { IDirectFB *foo; return 0; }
1890 EOF
1891 linux && test -c /dev/fb0 && cc_check -ldirectfb && _directfb=yes
1892 fi
1893 if test "$_directfb" = yes ; then
1894 _def_directfb='#define HAVE_DIRECTFB 1'
1895 _vosrc="$_vosrc vo_directfb.c"
1896 _vomodules="directfb $_vomodules"
1897 _ld_directfb='-ldirectfb'
1898 else
1899 _def_directfb='#undef HAVE_DIRECTFB'
1900 _novomodules="directfb $_novomodules"
1901 fi
1902 echores "$_directfb"
1903
1904 if test "$_directfb" = yes; then
1905 echocheck "DirectFB >= 0.9.9"
1906 _directfb099=no
1907 cat > $TMPC <<EOF
1908 #include <directfb.h>
1909 int main(void) { IDirectFBEventBuffer *foo; return 0; }
1910 EOF
1911 cc_check -ldirectfb && _directfb099=yes
1912 if test "$_directfb099" = yes ; then
1913 _def_directfb099='#define HAVE_DIRECTFB099 1'
1914 else
1915 _def_directfb099='#undef HAVE_DIRECTFB099'
1916 fi
1917 echores "$_directfb099"
1918 fi
1919 if test "$_directfb" = yes; then
1920 echocheck "DirectFB >= 0.9.10"
1921 _directfb0910=no
1922 cat > $TMPC <<EOF
1923 #include <directfb.h>
1924 int main(void) { DFBDisplayLayerCapabilities caps=DLCAPS_DST_COLORKEY; return 0; }
1925 EOF
1926 cc_check -ldirectfb && _directfb0910=yes
1927 if test "$_directfb0910" = yes ; then
1928 _def_directfb0910='#define HAVE_DIRECTFB0910 1'
1929 else
1930 _def_directfb0910='#undef HAVE_DIRECTFB0910'
1931 fi
1932 echores "$_directfb0910"
1933 fi
1934 echocheck "X11" 1936 echocheck "X11"
1935 if test "$_x11" = auto || test "$_x11" = yes ; then 1937 if test "$_x11" != no ; then
1936 cat > $TMPC <<EOF 1938 cat > $TMPC <<EOF
1937 #include <X11/Xlib.h> 1939 #include <X11/Xlib.h>
1938 #include <X11/Xutil.h> 1940 #include <X11/Xutil.h>
1939 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; } 1941 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
1940 EOF 1942 EOF