Use of the GDAL SDE Raster or OGR ArcSDE drivers requires building GDAL/OGR with the ArcSDE client libraries. These are obtained from ESRI, normally on the SDE product CDs or perhaps as part of developer kit. It is not normally available for free.
Building on Linux
On linux this is specified something like:
./configure --with-sde=/home/gdal/ArcSDE-10.0 \ --with-sde-version=100
Note that the directory specified to --with-sde should have subdirectories "etc", "include" and "lib". The version is the version number multiplied by 10, so ArcSDE 9.3 would be "93".
Version of GDAL/OGR 1.8.0 or earlier will not normally work properly on x86_64 (64bit) linux systems due to the lack of the SDE64 define. This can be manually added in gdal-1.8.0/GDALmake.opt's CFLAGS as "-DSDE64" to work around the problem. It is corrected as part of ticket #4051.