The poor man's way to a straght edge is to take three flat long objects (can be aluminum, steel, wood, etc basically any stable dense material), mark one edge on each (I marked mine A, B, & C), and then match the edges and file, sand, rasp, plane, etc. until each edge gives a light-tight fit to both of the others. In the end, you end up with three. Use two and save one as a check standard. If wood, best to seal them after you are done to ensure they don't warp with humidity changes.
I did this using 3/4" hardwod ply to check the edges on the planks used for my work bench, and then again for my dining room table.
However, this can be a tedious process, and so i did end up buying a good 4' and 6' box level. They are not truly flat. Every box level I have checked is slighly bowed on the machined edge, with most bowed up in the middle with the edge down. Of those i have checked, most in the 4 and 6' range are bowed around .003" minimum. Most levels are made this way on purpose, because the accuracy stated is the accuracy of the level bubble in relation to the two ends, not straighness of the edge. It easier to slightly adjust an end than the entire surface to get it in tolerance. Aluminum ones will flex enough under moderate pressure to fit tight, tho. When I bought mine, there were several levels of each size in the rack, so I pulled them out and checked them against each other until I found the three closest, and bought one of them. (Yeah, i got some strange looks at Lowes, but most of the people there know me well enough that they kind of accept it from me, LOL))
In practice, box levels work fine once you get the eye-ball used to what amount of light needs to show in the center. I have done this by planing board edges, and have found how much I need so that the board edges are light-tight to each other. If you plane the boards to exactly match the level, you will find you have light showing on the ends when you put the boards together.
If you use hand planes to true up your glue edge, the edge does not have to be prefectly straight. As long as they match, you will have a good tight glue joint. Some also want a little light in the middle for tighter end glue as stated above. My process now is to use the level to get the first board as straight as I can. I then adjust the mating piece to get a tight fit.
If you are using the straight edge for set-up, the slight bow of a box level may not be acceptable, but it does work fine for matching matng surfaces.
JMTCW
Go